Socket
Socket
Sign inDemoInstall

@stencila/dockter

Package Overview
Dependencies
17
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.14.2 to 0.14.3

.vscode/settings.json

6

CONTRIBUTING.md

@@ -74,3 +74,9 @@ # Contributing

You might also want to create an alias for convieience during development:
```bash
alias dockter="npm run cli --"
```
## Architecture

@@ -77,0 +83,0 @@

9

dist/DockerBuilder.js

@@ -7,9 +7,10 @@ "use strict";

const crypto_1 = __importDefault(require("crypto"));
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const dockerode_1 = __importDefault(require("dockerode"));
const fs_1 = __importDefault(require("fs"));
// @ts-ignore
const ndjson_1 = __importDefault(require("ndjson"));
const docker_file_parser_1 = __importDefault(require("docker-file-parser"));
const path_1 = __importDefault(require("path"));
const tar_fs_1 = __importDefault(require("tar-fs"));
const zlib_1 = __importDefault(require("zlib"));
const ndjson = require('ndjson');
/**

@@ -120,3 +121,3 @@ * Builds Docker images from Dockerfiles

let id;
stream.pipe(ndjson.parse()).on('data', (data) => {
stream.pipe(ndjson_1.default.parse()).on('data', (data) => {
if (data.error) {

@@ -123,0 +124,0 @@ messages.push({

@@ -5,3 +5,9 @@ /**

export default interface IUrlFetcher {
/**
* Fetch a URL
*
* @param url URL to fetch
* @param options Any options
*/
fetchUrl(url: string, options: any): any;
}

@@ -128,2 +128,8 @@ "use strict";

}
// For scoped packages (e.g. `@types/node`) replace any slashes in the package name
// and fetch the latest version (see https://github.com/stencila/dockter/issues/87).
if (name[0] === '@') {
name = name.replace('/', '%2f');
version = '*';
}
// Fetch meta-data from NPM

@@ -130,0 +136,0 @@ const data = await this.fetch(`https://registry.npmjs.org/${name}/${version}`, {

@@ -8,4 +8,13 @@ import { SoftwarePackage } from '@stencila/schema';

interface PythonRequirement {
/**
* Type of requirement specified (name or URL)
*/
type: RequirementType;
/**
* Name or URL value of the requirement
*/
value: string;
type: RequirementType;
/**
* Version of the requirement
*/
version?: string | null;

@@ -12,0 +21,0 @@ }

{
"name": "@stencila/dockter",
"version": "0.14.2",
"version": "0.14.3",
"description": "A Docker image builder for researchers",

@@ -42,3 +42,3 @@ "main": "dist/index.js",

],
"author": "Contributors (https://github.com/stencila/dockter/contributors)",
"author": "Dockter contributors (https://github.com/stencila/dockter/contributors)",
"license": "Apache-2.0",

@@ -51,30 +51,30 @@ "bugs": {

"@semantic-release/commit-analyzer": "^6.1.0",
"@semantic-release/git": "^7.0.5",
"@semantic-release/github": "^5.2.0",
"@semantic-release/npm": "^5.0.5",
"@semantic-release/release-notes-generator": "^7.1.1",
"@types/dockerode": "^2.5.5",
"@types/express": "^4.16.0",
"@types/got": "^9.2.0",
"@types/jest": "^23.3.3",
"@types/js-yaml": "^3.11.2",
"@semantic-release/git": "^7.0.8",
"@semantic-release/github": "^5.2.10",
"@semantic-release/npm": "^5.1.4",
"@semantic-release/release-notes-generator": "^7.1.4",
"@types/dockerode": "^2.5.12",
"@types/express": "^4.16.1",
"@types/got": "^9.4.0",
"@types/jest": "^24.0.6",
"@types/js-yaml": "^3.12.0",
"@types/node-persist": "0.0.33",
"@types/semver": "^5.5.0",
"@types/tar-fs": "^1.16.1",
"@types/tmp": "0.0.33",
"@types/yargs": "^12.0.1",
"all-contributors-cli": "^5.4.1",
"commitizen": "^3.0.4",
"@types/tmp": "0.0.34",
"@types/yargs": "^12.0.9",
"all-contributors-cli": "^6.1.2",
"commitizen": "^3.0.7",
"cz-conventional-changelog": "^2.1.0",
"jest": "^23.6.0",
"jest": "^24.1.0",
"markdown-toc": "^1.2.0",
"pkg": "^4.3.4",
"semantic-release": "^15.10.5",
"semantic-release-cli": "^4.0.9",
"ts-jest": "^23.10.3",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"pkg": "^4.3.7",
"semantic-release": "^15.13.3",
"semantic-release-cli": "^4.1.0",
"ts-jest": "^24.0.0",
"ts-node": "^8.0.2",
"tslint": "^5.12.1",
"tslint-config-standard": "^8.0.1",
"typedoc": "^0.14.0",
"typescript": "^3.1.1"
"typedoc": "^0.14.2",
"typescript": "^3.3.3333"
},

@@ -98,3 +98,3 @@ "dependencies": {

"yargonaut": "^1.1.4",
"yargs": "^12.0.2"
"yargs": "^13.1.0"
},

@@ -101,0 +101,0 @@ "config": {

@@ -1,2 +0,2 @@

# Dockter: a Docker image builder for researchers
# Dockter: a container image builder for researchers

@@ -362,2 +362,6 @@ [![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors)

> 🛈 Docker images can get very large (2-3 GB is not unusual for an image with R and/or Python and associated packages).
> You might want to occasionally do a clean up of 'dangling' images using `docker image prune` to save disk space.
> See the Docker [documentation for more on cleaning up](https://docs.docker.com/config/pruning/) unused images and containers.
### Execute a Docker image

@@ -364,0 +368,0 @@

import crypto from 'crypto'
import fs from 'fs'
import path from 'path'
import Docker from 'dockerode'
import fs from 'fs'
// @ts-ignore
import ndjson from 'ndjson'
import parser from 'docker-file-parser'
import path from 'path'
import tarFs from 'tar-fs'
import zlib from 'zlib'
const ndjson = require('ndjson')
interface DockerMessageAux {
ID?: string
}
/* tslint:disable completed-docs */
interface DockerMessage {
error?: string
stream?: string
aux?: DockerMessageAux
aux?: {
ID?: string
}
}

@@ -20,0 +20,0 @@

@@ -5,3 +5,9 @@ /**

export default interface IUrlFetcher {
/**
* Fetch a URL
*
* @param url URL to fetch
* @param options Any options
*/
fetchUrl (url: string, options: any): any
}

@@ -125,2 +125,9 @@ // @ts-ignore

// For scoped packages (e.g. `@types/node`) replace any slashes in the package name
// and fetch the latest version (see https://github.com/stencila/dockter/issues/87).
if (name[0] === '@') {
name = name.replace('/', '%2f')
version = '*'
}
// Fetch meta-data from NPM

@@ -127,0 +134,0 @@ const data = await this.fetch(`https://registry.npmjs.org/${name}/${version}`, {

@@ -167,4 +167,15 @@ import { dirname, basename } from 'path'

interface PythonRequirement {
/**
* Type of requirement specified (name or URL)
*/
type: RequirementType
/**
* Name or URL value of the requirement
*/
value: string
type: RequirementType
/**
* Version of the requirement
*/
version?: string | null

@@ -171,0 +182,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc