mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
Bump min Node.js version to 8.0, ts-node to 8.1 and typescript to 3.4.
Refactor typings folder for use with the tsconfig typeRoots option. Change-type: major Signed-off-by: Paulo Castro <paulo@balena.io>
This commit is contained in:
parent
faa558b432
commit
13e3e5e8ea
@ -3,7 +3,7 @@ os:
|
|||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
node_js:
|
node_js:
|
||||||
- "6"
|
- "8"
|
||||||
before_install:
|
before_install:
|
||||||
- npm -g install npm@4
|
- npm -g install npm@4
|
||||||
script: npm run ci
|
script: npm run ci
|
||||||
|
@ -14,7 +14,7 @@ matrix:
|
|||||||
# what combinations to test
|
# what combinations to test
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- nodejs_version: 6
|
- nodejs_version: 8
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- ps: Install-Product node $env:nodejs_version x64
|
- ps: Install-Product node $env:nodejs_version x64
|
||||||
|
38
automation/custom-types.d.ts
vendored
38
automation/custom-types.d.ts
vendored
@ -1,38 +0,0 @@
|
|||||||
declare module 'pkg' {
|
|
||||||
export function exec(args: string[]): Promise<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module 'filehound' {
|
|
||||||
export function create(): FileHound;
|
|
||||||
|
|
||||||
export interface FileHound {
|
|
||||||
paths(paths: string[]): FileHound;
|
|
||||||
paths(...paths: string[]): FileHound;
|
|
||||||
ext(extensions: string[]): FileHound;
|
|
||||||
ext(...extensions: string[]): FileHound;
|
|
||||||
find(): Promise<string[]>;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module 'publish-release' {
|
|
||||||
interface PublishOptions {
|
|
||||||
token: string;
|
|
||||||
owner: string;
|
|
||||||
repo: string;
|
|
||||||
tag: string;
|
|
||||||
name: string;
|
|
||||||
reuseRelease?: boolean;
|
|
||||||
assets: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Release {
|
|
||||||
html_url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
let publishRelease: (
|
|
||||||
args: PublishOptions,
|
|
||||||
callback: (e: Error, release: Release) => void,
|
|
||||||
) => void;
|
|
||||||
|
|
||||||
export = publishRelease;
|
|
||||||
}
|
|
@ -1,16 +1,18 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es2015",
|
"target": "es2017",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"strictPropertyInitialization": false,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"preserveConstEnums": true,
|
"preserveConstEnums": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"sourceMap": true
|
"sourceMap": true,
|
||||||
},
|
"skipLibCheck": true,
|
||||||
"include": [
|
"typeRoots" : [
|
||||||
"./**/*.ts",
|
"../node_modules/@types",
|
||||||
"../typings/*.d.ts"
|
"../typings"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -12,8 +12,12 @@ process.env.UV_THREADPOOL_SIZE = '64';
|
|||||||
// Use fast-boot to cache require lookups, speeding up startup
|
// Use fast-boot to cache require lookups, speeding up startup
|
||||||
require('fast-boot2').start({
|
require('fast-boot2').start({
|
||||||
cacheFile: '.fast-boot.json'
|
cacheFile: '.fast-boot.json'
|
||||||
})
|
});
|
||||||
process.env['TS_NODE_PROJECT'] = require('path').dirname(__dirname);
|
|
||||||
require('coffeescript/register');
|
require('coffeescript/register');
|
||||||
require('ts-node/register');
|
// Note: before ts-node v6.0.0, 'transpile-only' (no type checking) was the
|
||||||
|
// default option. We upgraded ts-node and found that adding 'transpile-only'
|
||||||
|
// was necessary to avoid a mysterious 'null' error message. On the plus side,
|
||||||
|
// it is supposed to run faster. We still benefit from type checking when
|
||||||
|
// running 'npm run build'.
|
||||||
|
require('ts-node/register/transpile-only');
|
||||||
require('../lib/app');
|
require('../lib/app');
|
||||||
|
@ -15,6 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ApplicationVariable, DeviceVariable } from 'balena-sdk';
|
import { ApplicationVariable, DeviceVariable } from 'balena-sdk';
|
||||||
|
import * as Bluebird from 'bluebird';
|
||||||
import { CommandDefinition } from 'capitano';
|
import { CommandDefinition } from 'capitano';
|
||||||
import { stripIndent } from 'common-tags';
|
import { stripIndent } from 'common-tags';
|
||||||
|
|
||||||
@ -73,14 +74,13 @@ export const list: CommandDefinition<
|
|||||||
permission: 'user',
|
permission: 'user',
|
||||||
async action(_params, options, done) {
|
async action(_params, options, done) {
|
||||||
normalizeUuidProp(options, 'device');
|
normalizeUuidProp(options, 'device');
|
||||||
const Bluebird = await import('bluebird');
|
|
||||||
const _ = await import('lodash');
|
const _ = await import('lodash');
|
||||||
const balena = (await import('balena-sdk')).fromSharedOptions();
|
const balena = (await import('balena-sdk')).fromSharedOptions();
|
||||||
const visuals = await import('resin-cli-visuals');
|
const visuals = await import('resin-cli-visuals');
|
||||||
|
|
||||||
const { exitWithExpectedError } = await import('../utils/patterns');
|
const { exitWithExpectedError } = await import('../utils/patterns');
|
||||||
|
|
||||||
return Bluebird.try(function(): Promise<
|
return Bluebird.try(function(): Bluebird<
|
||||||
DeviceVariable[] | ApplicationVariable[]
|
DeviceVariable[] | ApplicationVariable[]
|
||||||
> {
|
> {
|
||||||
if (options.application) {
|
if (options.application) {
|
||||||
@ -209,7 +209,6 @@ export const add: CommandDefinition<
|
|||||||
permission: 'user',
|
permission: 'user',
|
||||||
async action(params, options, done) {
|
async action(params, options, done) {
|
||||||
normalizeUuidProp(options, 'device');
|
normalizeUuidProp(options, 'device');
|
||||||
const Bluebird = await import('bluebird');
|
|
||||||
const _ = await import('lodash');
|
const _ = await import('lodash');
|
||||||
const balena = (await import('balena-sdk')).fromSharedOptions();
|
const balena = (await import('balena-sdk')).fromSharedOptions();
|
||||||
|
|
||||||
@ -280,7 +279,6 @@ export const rename: CommandDefinition<
|
|||||||
permission: 'user',
|
permission: 'user',
|
||||||
options: [commandOptions.booleanDevice],
|
options: [commandOptions.booleanDevice],
|
||||||
async action(params, options, done) {
|
async action(params, options, done) {
|
||||||
const Bluebird = await import('bluebird');
|
|
||||||
const balena = (await import('balena-sdk')).fromSharedOptions();
|
const balena = (await import('balena-sdk')).fromSharedOptions();
|
||||||
|
|
||||||
return Bluebird.try(function() {
|
return Bluebird.try(function() {
|
||||||
|
@ -180,8 +180,8 @@ export const tunnel: CommandDefinition<Args, Options> = {
|
|||||||
return handler(client)
|
return handler(client)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
logConnection(
|
logConnection(
|
||||||
client.remoteAddress,
|
client.remoteAddress || '',
|
||||||
client.remotePort,
|
client.remotePort || 0,
|
||||||
client.localAddress,
|
client.localAddress,
|
||||||
client.localPort,
|
client.localPort,
|
||||||
device.vpn_address || '',
|
device.vpn_address || '',
|
||||||
@ -190,8 +190,8 @@ export const tunnel: CommandDefinition<Args, Options> = {
|
|||||||
})
|
})
|
||||||
.catch(err =>
|
.catch(err =>
|
||||||
logConnection(
|
logConnection(
|
||||||
client.remoteAddress,
|
client.remoteAddress || '',
|
||||||
client.remotePort,
|
client.remotePort || 0,
|
||||||
client.localAddress,
|
client.localAddress,
|
||||||
client.localPort,
|
client.localPort,
|
||||||
device.vpn_address || '',
|
device.vpn_address || '',
|
||||||
|
25
lib/global.d.ts
vendored
Normal file
25
lib/global.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
interface Dictionary<T> {
|
||||||
|
[key: string]: T;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*/package.json' {
|
||||||
|
export const name: string;
|
||||||
|
export const version: string;
|
||||||
|
}
|
@ -228,7 +228,8 @@ export async function deployToDevice(opts: DeviceDeployOptions): Promise<void> {
|
|||||||
deployOpts: opts,
|
deployOpts: opts,
|
||||||
});
|
});
|
||||||
|
|
||||||
const promises = [livepush.init()];
|
globalLogger.logLivepush('Watching for file changes...');
|
||||||
|
const promises: Array<Bluebird<void> | Promise<void>> = [livepush.init()];
|
||||||
// Only show logs if we're not detaching
|
// Only show logs if we're not detaching
|
||||||
if (!opts.detached) {
|
if (!opts.detached) {
|
||||||
console.log();
|
console.log();
|
||||||
|
@ -98,7 +98,7 @@ export async function startRemoteBuild(build: RemoteBuild): Promise<void> {
|
|||||||
output: process.stdout,
|
output: process.stdout,
|
||||||
});
|
});
|
||||||
|
|
||||||
rl.on('SIGINT', () => process.emit('SIGINT'));
|
rl.on('SIGINT', () => process.emit('SIGINT' as any));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Bluebird((resolve, reject) => {
|
return new Bluebird((resolve, reject) => {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import * as Bluebird from 'bluebird';
|
import * as Bluebird from 'bluebird';
|
||||||
import { spawn } from 'child_process';
|
import { spawn, StdioOptions } from 'child_process';
|
||||||
import { TypedError } from 'typed-error';
|
import { TypedError } from 'typed-error';
|
||||||
|
|
||||||
import { getSubShellCommand } from './helpers';
|
import { getSubShellCommand } from './helpers';
|
||||||
@ -45,7 +45,7 @@ export async function exec(
|
|||||||
root@${deviceIp} \
|
root@${deviceIp} \
|
||||||
${cmd}`;
|
${cmd}`;
|
||||||
|
|
||||||
const stdio = ['ignore', stdout ? 'pipe' : 'inherit', 'ignore'];
|
const stdio: StdioOptions = ['ignore', stdout ? 'pipe' : 'inherit', 'ignore'];
|
||||||
const { program, args } = getSubShellCommand(command);
|
const { program, args } = getSubShellCommand(command);
|
||||||
|
|
||||||
const exitCode = await new Bluebird<number>((resolve, reject) => {
|
const exitCode = await new Bluebird<number>((resolve, reject) => {
|
||||||
|
@ -1,4 +1,20 @@
|
|||||||
import { spawn } from 'child_process';
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
import { spawn, StdioOptions } from 'child_process';
|
||||||
|
|
||||||
import * as Bluebird from 'bluebird';
|
import * as Bluebird from 'bluebird';
|
||||||
import * as rindle from 'rindle';
|
import * as rindle from 'rindle';
|
||||||
@ -7,9 +23,14 @@ export async function executeWithPrivileges(
|
|||||||
command: string[],
|
command: string[],
|
||||||
stderr?: NodeJS.WritableStream,
|
stderr?: NodeJS.WritableStream,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
|
const stdio: StdioOptions = [
|
||||||
|
'inherit',
|
||||||
|
'inherit',
|
||||||
|
stderr ? 'pipe' : 'inherit',
|
||||||
|
];
|
||||||
const opts = {
|
const opts = {
|
||||||
stdio: ['inherit', 'inherit', stderr ? 'pipe' : 'inherit'],
|
|
||||||
env: process.env,
|
env: process.env,
|
||||||
|
stdio,
|
||||||
};
|
};
|
||||||
|
|
||||||
const args = process.argv
|
const args = process.argv
|
||||||
|
14
package.json
14
package.json
@ -35,9 +35,9 @@
|
|||||||
"build": "npm run build:src && npm run build:bin",
|
"build": "npm run build:src && npm run build:bin",
|
||||||
"build:src": "npm run prettify && npm run lint && npm run build:fast && npm run build:doc",
|
"build:src": "npm run prettify && npm run lint && npm run build:fast && npm run build:doc",
|
||||||
"build:fast": "gulp build && tsc",
|
"build:fast": "gulp build && tsc",
|
||||||
"build:doc": "mkdirp doc/ && ts-node automation/capitanodoc/index.ts > doc/cli.markdown",
|
"build:doc": "mkdirp doc/ && ts-node --type-check -P automation/tsconfig.json automation/capitanodoc/index.ts > doc/cli.markdown",
|
||||||
"build:bin": "ts-node --type-check -P automation automation/build-bin.ts",
|
"build:bin": "ts-node --type-check -P automation/tsconfig.json automation/build-bin.ts",
|
||||||
"release": "npm run build && ts-node --type-check -P automation automation/deploy-bin.ts",
|
"release": "npm run build && ts-node --type-check -P automation/tsconfig.json automation/deploy-bin.ts",
|
||||||
"pretest": "npm run build",
|
"pretest": "npm run build",
|
||||||
"test": "gulp test",
|
"test": "gulp test",
|
||||||
"test:fast": "npm run build:fast && gulp test",
|
"test:fast": "npm run build:fast && gulp test",
|
||||||
@ -60,7 +60,7 @@
|
|||||||
"author": "Juan Cruz Viotti <juan@balena.io>",
|
"author": "Juan Cruz Viotti <juan@balena.io>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0"
|
"node": ">=8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/archiver": "2.1.2",
|
"@types/archiver": "2.1.2",
|
||||||
@ -76,7 +76,7 @@
|
|||||||
"@types/mkdirp": "0.5.2",
|
"@types/mkdirp": "0.5.2",
|
||||||
"@types/mz": "0.0.32",
|
"@types/mz": "0.0.32",
|
||||||
"@types/net-keepalive": "^0.4.0",
|
"@types/net-keepalive": "^0.4.0",
|
||||||
"@types/node": "6.14.2",
|
"@types/node": "10.14.5",
|
||||||
"@types/prettyjson": "0.0.28",
|
"@types/prettyjson": "0.0.28",
|
||||||
"@types/raven": "2.5.1",
|
"@types/raven": "2.5.1",
|
||||||
"@types/request": "2.48.1",
|
"@types/request": "2.48.1",
|
||||||
@ -100,8 +100,8 @@
|
|||||||
"require-npm4-to-publish": "^1.0.0",
|
"require-npm4-to-publish": "^1.0.0",
|
||||||
"resin-lint": "^3.0.1",
|
"resin-lint": "^3.0.1",
|
||||||
"rewire": "^3.0.2",
|
"rewire": "^3.0.2",
|
||||||
"ts-node": "^4.0.1",
|
"ts-node": "^8.1.0",
|
||||||
"typescript": "2.8.1"
|
"typescript": "3.4.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@resin.io/valid-email": "^0.1.0",
|
"@resin.io/valid-email": "^0.1.0",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es6",
|
"target": "es2017",
|
||||||
"outDir": "build",
|
"outDir": "build",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"strictPropertyInitialization": false,
|
"strictPropertyInitialization": false,
|
||||||
@ -11,20 +11,13 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": [
|
"typeRoots" : [
|
||||||
// es5 defaults:
|
"./node_modules/@types",
|
||||||
"dom",
|
"./node_modules/etcher-sdk/typings",
|
||||||
"es5",
|
"./typings"
|
||||||
"scripthost",
|
|
||||||
// some specific es6 bits we're sure are safe:
|
|
||||||
"es2015.collection",
|
|
||||||
"es2015.iterable",
|
|
||||||
"es2016.array.include"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./typings/*.d.ts",
|
|
||||||
"./node_modules/etcher-sdk/typings/**/*.d.ts",
|
|
||||||
"./lib/**/*.ts"
|
"./lib/**/*.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
1
typings/@resin-valid-email.d.ts
vendored
1
typings/@resin-valid-email.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
declare module '@resin.io/valid-email';
|
|
@ -14,6 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare module 'balena-device-init' {
|
declare module 'balena-device-init' {
|
||||||
import { DeviceType } from 'balena-sdk';
|
import { DeviceType } from 'balena-sdk';
|
||||||
import * as Promise from 'bluebird';
|
import * as Promise from 'bluebird';
|
5
typings/balena-sync.d.ts
vendored
5
typings/balena-sync.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
declare module 'balena-sync' {
|
|
||||||
import { CommandDefinition } from 'capitano';
|
|
||||||
|
|
||||||
export function capitano(tool: 'balena-cli'): CommandDefinition;
|
|
||||||
}
|
|
22
typings/balena-sync/index.d.ts
vendored
Normal file
22
typings/balena-sync/index.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'balena-sync' {
|
||||||
|
import { CommandDefinition } from 'capitano';
|
||||||
|
|
||||||
|
export function capitano(tool: 'balena-cli'): CommandDefinition;
|
||||||
|
}
|
@ -1,3 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
declare module 'capitano' {
|
declare module 'capitano' {
|
||||||
export function parse(argv: string[]): Cli;
|
export function parse(argv: string[]): Cli;
|
||||||
|
|
@ -14,6 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare module 'color-hash' {
|
declare module 'color-hash' {
|
||||||
interface Hasher {
|
interface Hasher {
|
||||||
hex(text: string): string;
|
hex(text: string): string;
|
13
typings/dockerfile-template.d.ts
vendored
13
typings/dockerfile-template.d.ts
vendored
@ -1,13 +0,0 @@
|
|||||||
declare module 'dockerfile-template' {
|
|
||||||
/**
|
|
||||||
* Variables which define what will be replaced, and what they will be replaced with.
|
|
||||||
*/
|
|
||||||
export interface TemplateVariables {
|
|
||||||
[key: string]: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function process(
|
|
||||||
content: string,
|
|
||||||
variables: TemplateVariables,
|
|
||||||
): string;
|
|
||||||
}
|
|
30
typings/dockerfile-template/index.d.ts
vendored
Normal file
30
typings/dockerfile-template/index.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'dockerfile-template' {
|
||||||
|
/**
|
||||||
|
* Variables which define what will be replaced, and what they will be replaced with.
|
||||||
|
*/
|
||||||
|
export interface TemplateVariables {
|
||||||
|
[key: string]: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function process(
|
||||||
|
content: string,
|
||||||
|
variables: TemplateVariables,
|
||||||
|
): string;
|
||||||
|
}
|
1
typings/ent.d.ts
vendored
1
typings/ent.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
declare module 'ent';
|
|
18
typings/ent/index.d.ts
vendored
Normal file
18
typings/ent/index.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'ent';
|
28
typings/filehound/index.d.ts
vendored
Normal file
28
typings/filehound/index.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'filehound' {
|
||||||
|
export function create(): FileHound;
|
||||||
|
|
||||||
|
export interface FileHound {
|
||||||
|
paths(paths: string[]): FileHound;
|
||||||
|
paths(...paths: string[]): FileHound;
|
||||||
|
ext(extensions: string[]): FileHound;
|
||||||
|
ext(...extensions: string[]): FileHound;
|
||||||
|
find(): Promise<string[]>;
|
||||||
|
}
|
||||||
|
}
|
3
typings/global.d.ts
vendored
3
typings/global.d.ts
vendored
@ -1,3 +0,0 @@
|
|||||||
interface Dictionary<T> {
|
|
||||||
[key: string]: T;
|
|
||||||
}
|
|
@ -14,6 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare module 'inquirer-dynamic-list' {
|
declare module 'inquirer-dynamic-list' {
|
||||||
interface Choice {
|
interface Choice {
|
||||||
name: string;
|
name: string;
|
@ -14,6 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare module 'nplugm' {
|
declare module 'nplugm' {
|
||||||
import Promise = require('bluebird');
|
import Promise = require('bluebird');
|
||||||
export function list(regexp: RegExp): Promise<string[]>;
|
export function list(regexp: RegExp): Promise<string[]>;
|
4
typings/package.json.d.ts
vendored
4
typings/package.json.d.ts
vendored
@ -1,4 +0,0 @@
|
|||||||
declare module '*/package.json' {
|
|
||||||
export const name: string;
|
|
||||||
export const version: string;
|
|
||||||
}
|
|
20
typings/pkg/index.d.ts
vendored
Normal file
20
typings/pkg/index.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'pkg' {
|
||||||
|
export function exec(args: string[]): Promise<void>;
|
||||||
|
}
|
6
typings/president.d.ts
vendored
6
typings/president.d.ts
vendored
@ -1,6 +0,0 @@
|
|||||||
declare module 'president' {
|
|
||||||
export function execute(
|
|
||||||
command: string[],
|
|
||||||
callback: (err: Error) => void,
|
|
||||||
): void;
|
|
||||||
}
|
|
23
typings/president/index.d.ts
vendored
Normal file
23
typings/president/index.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'president' {
|
||||||
|
export function execute(
|
||||||
|
command: string[],
|
||||||
|
callback: (err: Error) => void,
|
||||||
|
): void;
|
||||||
|
}
|
39
typings/publish-release/index.d.ts
vendored
Normal file
39
typings/publish-release/index.d.ts
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'publish-release' {
|
||||||
|
interface PublishOptions {
|
||||||
|
token: string;
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
tag: string;
|
||||||
|
name: string;
|
||||||
|
reuseRelease?: boolean;
|
||||||
|
assets: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Release {
|
||||||
|
html_url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
let publishRelease: (
|
||||||
|
args: PublishOptions,
|
||||||
|
callback: (e: Error, release: Release) => void,
|
||||||
|
) => void;
|
||||||
|
|
||||||
|
export = publishRelease;
|
||||||
|
}
|
1
typings/resin-cli-form.d.ts
vendored
1
typings/resin-cli-form.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
declare module 'resin-cli-form';
|
|
18
typings/resin-cli-form/index.d.ts
vendored
Normal file
18
typings/resin-cli-form/index.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'resin-cli-form';
|
1
typings/resin-cli-visuals.d.ts
vendored
1
typings/resin-cli-visuals.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
declare module 'resin-cli-visuals';
|
|
18
typings/resin-cli-visuals/index.d.ts
vendored
Normal file
18
typings/resin-cli-visuals/index.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'resin-cli-visuals';
|
5
typings/resin-image-fs.d.ts
vendored
5
typings/resin-image-fs.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
declare module 'resin-image-fs' {
|
|
||||||
import Promise = require('bluebird');
|
|
||||||
|
|
||||||
export function readFile(options: {}): Promise<string>;
|
|
||||||
}
|
|
22
typings/resin-image-fs/index.d.ts
vendored
Normal file
22
typings/resin-image-fs/index.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'resin-image-fs' {
|
||||||
|
import Promise = require('bluebird');
|
||||||
|
|
||||||
|
export function readFile(options: {}): Promise<string>;
|
||||||
|
}
|
18
typings/resin.io/index.d.ts
vendored
Normal file
18
typings/resin.io/index.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Balena Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module '@resin.io/valid-email';
|
@ -14,6 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare module 'rindle' {
|
declare module 'rindle' {
|
||||||
export function extract(
|
export function extract(
|
||||||
stream: NodeJS.ReadableStream,
|
stream: NodeJS.ReadableStream,
|
Loading…
Reference in New Issue
Block a user