Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#101 Fixed 'project.location' including 'dever.json' in path. #102

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bin/configuration/facades/project-config-facade.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import schemaValidator, {SchemaTypes} from "../../common/validators/schema-valid
import versionChecker from "../../common/helper/version-checker.js";
import configValidator from "../../common/helper/config-validator.js";

import path from "path";

"use strict";
export default new class {
/**
Expand Down Expand Up @@ -157,7 +159,7 @@ export default new class {
return {
...projectConfig,
id: id,
location: project.path,
location: path.dirname(project.path),
lastHash: project.lastHash,
skipHashCheck: config.skipAllHashChecks || project.skipHashCheck || false,
supported: versionChecker.supportedVersion(projectConfig?.version ?? 0),
Expand Down
8 changes: 4 additions & 4 deletions bin/environments/executions/powershell-script/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import chalk from "chalk";
export default new class {
/**
*
* @param component {Project}
* @param project {Project}
* @param execution {Execution}
* @param runtime {Runtime}
* @return {Promise<void>}
*/
async handle(component, execution, runtime) {
async handle(project, execution, runtime) {
if (runtime.stop && !execution.hasStop) {
if (execution.hasStart) {
console.log(chalk.yellow(`powershell-script: '${execution.name}' does not have a stop action.`));
Expand All @@ -26,7 +26,7 @@ export default new class {
}

try {
const file = path.join(component.location, execution.file);
const file = path.join(project.location, execution.file);
const fileWithParameters = customOptions.addOptionsToFile(file, execution.options, runtime.args);
await powershell.executeFileSync(fileWithParameters, execution.runAsElevated);

Expand All @@ -35,4 +35,4 @@ export default new class {
logger.error(`powershell-script: '${execution.name}' completed with errors`, e);
}
}
}
}
1 change: 1 addition & 0 deletions bin/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default new class {

const configs = projectConfigFacade.getAll();

// Todo: Remove these. all dever.json should be added. Though only supported will work!
this.#checkForSupportedVersion(configs);
this.#checkForKeywordViolations(configs);

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@czprz/dever",
"version": "0.11.3-beta",
"version": "0.11.4-beta",
"description": "Development Helper (dev-er) to speed up and keep local development environment consistent",
"author": "Casper Overholm Elkrog",
"keywords": [
Expand Down