@connectedcars/setup
Advanced tools
Comparing version 0.10.1 to 0.10.2
@@ -83,3 +83,3 @@ #!/usr/bin/env node | ||
forceLog(`Applying fixes for configuration files in ${process.cwd()}`) | ||
await fixTarget(`${templatesPath}/${options.template}`, process.cwd(), options) | ||
await fixTarget(`${templatesPath}/${options.template}`, sub.length > 0 ? sub[0] : process.cwd(), options) | ||
} | ||
@@ -86,0 +86,0 @@ } |
@@ -79,3 +79,3 @@ #!/usr/bin/env node | ||
(0, _log.forceLog)(`Applying fixes for configuration files in ${process.cwd()}`); | ||
await (0, _index.fixTarget)(`${templatesPath}/${options.template}`, process.cwd(), options); | ||
await (0, _index.fixTarget)(`${templatesPath}/${options.template}`, sub.length > 0 ? sub[0] : process.cwd(), options); | ||
} | ||
@@ -82,0 +82,0 @@ } |
export declare function createTemporaryFolder(): Promise<string>; | ||
export declare function readTextFile(path: string): Promise<string>; | ||
export declare function readJsonFile(path: string): Promise<any>; | ||
export declare function readJsonFile<T = unknown>(path: string): Promise<T>; | ||
interface FolderTextFiles { | ||
@@ -5,0 +5,0 @@ [key: string]: { |
@@ -0,3 +1,15 @@ | ||
export interface StringMap { | ||
[key: string]: string; | ||
} | ||
export interface PackageJson { | ||
dependencies: StringMap; | ||
devDependencies: StringMap; | ||
scripts: StringMap; | ||
files?: string[]; | ||
engines: StringMap; | ||
babel?: StringMap; | ||
jest?: StringMap; | ||
} | ||
export declare function updatePackageJson(templatePath: string, target: string, options?: { | ||
[key: string]: unknown; | ||
}): Promise<boolean>; |
{ | ||
"name": "@connectedcars/setup", | ||
"version": "0.10.1", | ||
"version": "0.10.2", | ||
"description": "Connected Cars JavaScript/TypeScript development setup", | ||
@@ -30,3 +30,3 @@ "main": "build/dist/src/index.js", | ||
"prepublishOnly": "rm -rf build", | ||
"postinstall": "! command -v setup || setup fix" | ||
"postinstall": "! command -v setup || setup fix $INIT_CWD" | ||
}, | ||
@@ -33,0 +33,0 @@ "repository": { |
@@ -23,3 +23,3 @@ import crypto from 'crypto' | ||
export async function readJsonFile(path: string): Promise<any> { | ||
export async function readJsonFile<T = unknown>(path: string): Promise<T> { | ||
const content = await readFile(path, 'utf8') | ||
@@ -26,0 +26,0 @@ return JSON.parse(content) |
@@ -6,6 +6,6 @@ import { readJsonFile, writeFileAtomic } from './fsutils' | ||
interface StringMap { | ||
export interface StringMap { | ||
[key: string]: string | ||
} | ||
interface PackageJson { | ||
export interface PackageJson { | ||
dependencies: StringMap | ||
@@ -12,0 +12,0 @@ devDependencies: StringMap |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
97371
1160