Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adonisjs/sink

Package Overview
Dependencies
Maintainers
2
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adonisjs/sink - npm Package Compare versions

Comparing version 2.2.3 to 2.3.0

src/logger.d.ts

1

index.d.ts

@@ -9,2 +9,3 @@ import { PromptContract } from '@poppinss/prompts';

export { getPrompt };
export { logger } from './src/logger';
export { RcFile } from './src/files/RcFile';

@@ -11,0 +12,0 @@ export { isEmptyDir } from './src/isEmptyDir';

@@ -21,2 +21,4 @@ "use strict";

exports.sinkVersion = pkg.version;
var logger_1 = require("./src/logger");
exports.logger = logger_1.logger;
var RcFile_1 = require("./src/files/RcFile");

@@ -23,0 +25,0 @@ exports.RcFile = RcFile_1.RcFile;

30

package.json
{
"name": "@adonisjs/sink",
"version": "2.2.3",
"version": "2.3.0",
"description": "Utilities to create AdonisJs boilerplates and custom providers",

@@ -32,10 +32,10 @@ "main": "index.js",

"devDependencies": {
"@adonisjs/application": "^1.0.14",
"@adonisjs/application": "^1.2.1",
"@adonisjs/dev-utils": "^1.4.0",
"@adonisjs/fold": "^6.2.1",
"@adonisjs/fold": "^6.2.2",
"@adonisjs/mrm-preset": "^2.1.0",
"@types/fs-extra": "^8.0.0",
"@types/fs-extra": "^8.0.1",
"@types/ini": "^1.3.30",
"@types/marked": "^0.6.5",
"@types/node": "^12.7.12",
"@types/marked": "^0.7.0",
"@types/node": "^12.12.7",
"@types/yaml": "^1.2.0",

@@ -46,12 +46,12 @@ "commitizen": "^4.0.3",

"doctoc": "^1.4.0",
"husky": "^3.0.8",
"husky": "^3.0.9",
"ini": "^1.3.5",
"japa": "^3.0.1",
"mrm": "^1.2.2",
"np": "^5.1.1",
"ts-node": "^8.4.1",
"tslint": "^5.20.0",
"np": "^5.1.3",
"ts-node": "^8.5.0",
"tslint": "^5.20.1",
"tslint-eslint-rules": "^5.4.0",
"typescript": "^3.6.4",
"yaml": "^1.7.1"
"typescript": "^3.7.2",
"yaml": "^1.7.2"
},

@@ -79,4 +79,4 @@ "nyc": {

"@poppinss/colors": "^1.0.1",
"@poppinss/fancy-logs": "^1.1.1",
"@poppinss/prompts": "^1.0.3",
"@poppinss/fancy-logs": "^1.2.1",
"@poppinss/prompts": "^1.0.4",
"@poppinss/utils": "^2.0.0",

@@ -86,3 +86,3 @@ "fs-extra": "^8.1.0",

"mrm-core": "^3.3.4",
"open": "^6.4.0"
"open": "^7.0.0"
},

@@ -89,0 +89,0 @@ "peerDependencies": {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fancy_logs_1 = require("@poppinss/fancy-logs");
const colors_1 = require("@poppinss/colors");
const path_1 = require("path");
const colors_1 = require("@poppinss/colors");
const TemplateFile_1 = require("./formats/TemplateFile");
const logger = new fancy_logs_1.Logger({ color: true, icon: false, underline: false });
const logger_1 = require("./logger");
const colors = new colors_1.Colors();

@@ -16,3 +15,3 @@ function copyTemplates(projectRoot, application, templatesBasePath, templates) {

if (!configuredDirectory) {
logger.error({
logger_1.logger.error({
message: `Unknown directory type ${colors.underline(templateFor)}`,

@@ -37,7 +36,7 @@ icon: true,

if (template.exists()) {
logger.skip(destinationPath);
logger_1.logger.skip(destinationPath);
return;
}
template.apply({}).commit();
logger.create(destinationPath);
logger_1.logger.create(destinationPath);
});

@@ -44,0 +43,0 @@ });

@@ -10,6 +10,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const fancy_logs_1 = require("@poppinss/fancy-logs");
const utils_1 = require("@poppinss/utils");
const path_1 = require("path");
const logger = new fancy_logs_1.Logger({ color: true, icon: false, underline: false });
const logger_1 = require("./logger");
async function executeInstructions(packageName, projectRoot, application) {

@@ -36,3 +35,3 @@ const sink = await Promise.resolve().then(() => __importStar(require('../index')));

env.commit();
logger.update('.env');
logger_1.logger.update('.env');
}

@@ -46,5 +45,13 @@ if (pkg.adonisjs.types) {

tsConfig.commit();
logger.update('tsconfig');
logger_1.logger.update('tsconfig.json');
}
}
if (Array.isArray(pkg.adonisjs.commands)) {
const adonisRcFile = new sink.RcFile(projectRoot);
pkg.adonisjs.commands.forEach((command) => {
adonisRcFile.addCommand(command);
});
adonisRcFile.commit();
logger_1.logger.update('.adonisrc.json');
}
if (pkg.adonisjs.instructionsMd) {

@@ -51,0 +58,0 @@ await sink.renderMarkdown(path_1.join(path_1.dirname(packagePath), pkg.adonisjs.instructionsMd), packageName);

@@ -5,2 +5,3 @@ import { JsonFile } from '../formats/JsonFile';

private _metaFiles;
private _commands;
constructor(basePath: string);

@@ -13,2 +14,3 @@ onset(lifecycle: string, body: any): true | undefined;

addMetaFile(filePath: string, reloadServer?: boolean): void;
addCommand(commandPath: string): void;
}

@@ -9,4 +9,6 @@ "use strict";

this._metaFiles = [];
this._commands = [];
this._preloads = this.get('preloads', []);
this._metaFiles = this.get('metaFiles', []);
this._commands = this.get('commands', []);
}

@@ -25,2 +27,7 @@ onset(lifecycle, body) {

}
if (body.key.startsWith('commands')) {
const index = body.key.split('[')[1].replace(/\]/g, '');
this.get('commands', []).splice(index, 1);
return true;
}
}

@@ -71,3 +78,11 @@ }

}
addCommand(commandPath) {
let entryIndex = this._commands.findIndex((command) => {
return command === commandPath;
});
entryIndex = entryIndex === -1 ? this._commands.length : entryIndex;
this._commands[entryIndex] = commandPath;
this.set(`commands[${entryIndex}]`, commandPath);
}
}
exports.RcFile = RcFile;
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc