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

@nx-dotnet/core

Package Overview
Dependencies
Maintainers
1
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nx-dotnet/core - npm Package Compare versions

Comparing version 0.1.4-dev.2 to 0.1.4-dev.3

src/generators/utils/generate-project.d.ts

6

package.json

@@ -9,6 +9,6 @@ {

"chokidar": "^3.5.1",
"@nx-dotnet/dotnet": "0.1.4-dev.2",
"@nx-dotnet/utils": "0.1.4-dev.2"
"@nx-dotnet/dotnet": "0.1.4-dev.3",
"@nx-dotnet/utils": "0.1.4-dev.3"
},
"version": "0.1.4-dev.2"
"version": "0.1.4-dev.3"
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const devkit_1 = require("@nrwl/devkit");
const dotnet_1 = require("@nx-dotnet/dotnet");
const utils_1 = require("@nx-dotnet/utils");
const build_executor_configuration_1 = require("../../models/build-executor-configuration");
const serve_executor_configuration_1 = require("../../models/serve-executor-configuration");
const generator_1 = require("../init/generator");
function normalizeOptions(host, options) {
const name = devkit_1.names(options.name).fileName;
const projectDirectory = options.directory
? `${devkit_1.names(options.directory).fileName}/${name}`
: name;
const projectName = projectDirectory.replace(new RegExp('/', 'g'), '-');
const projectRoot = `${devkit_1.getWorkspaceLayout(host).appsDir}/${projectDirectory}`;
const parsedTags = options.tags
? options.tags.split(',').map((s) => s.trim())
: [];
return Object.assign(Object.assign({}, options), { name,
projectName,
projectRoot,
projectDirectory,
parsedTags, projectLanguage: options.language, projectTemplate: options.template });
}
const generate_project_1 = require("../utils/generate-project");
function default_1(host, options, dotnetClient = new dotnet_1.DotNetClient(dotnet_1.dotnetFactory())) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
generator_1.default(host);
const normalizedOptions = normalizeOptions(host, options);
devkit_1.addProjectConfiguration(host, normalizedOptions.projectName, {
root: normalizedOptions.projectRoot,
projectType: 'application',
sourceRoot: `${normalizedOptions.projectRoot}`,
targets: {
build: build_executor_configuration_1.GetBuildExecutorConfiguration(normalizedOptions.name),
serve: serve_executor_configuration_1.GetServeExecutorConfig()
},
tags: normalizedOptions.parsedTags,
});
const newParams = [
{
flag: 'language',
value: normalizedOptions.language,
},
{
flag: 'name',
value: normalizedOptions.name,
},
{
flag: 'output',
value: normalizedOptions.projectRoot,
},
];
if (utils_1.isDryRun()) {
newParams.push({
flag: 'dry-run',
});
}
dotnetClient.new(normalizedOptions.template, newParams);
yield devkit_1.formatFiles(host);
});
return generate_project_1.GenerateProject(host, options, dotnetClient, 'application');
}
exports.default = default_1;
//# sourceMappingURL=generator.js.map

@@ -1,7 +0,3 @@

export interface NxDotnetGeneratorSchema {
name: string;
tags?: string;
directory?: string;
template: string;
language: string;
}
import { NxDotnetProjectGeneratorSchema } from "../../models";
export type NxDotnetGeneratorSchema = NxDotnetProjectGeneratorSchema

@@ -40,2 +40,17 @@ {

}
},
"test-template": {
"type": "string",
"description": "Which template should be used for creating the tests project?",
"default": "nunit",
"x-prompt": {
"message": "Which template should be used for creating the tests project",
"type": "list",
"items": [
{"value": "nunit", "label": "NUnit 3 Test Project"},
{"value": "xunit", "label": "xUnit Test Project"},
{"value": "mstest", "label": "Unit Test Project"},
{"value": null, "label": "No Unit Test Project"}
]
}
}

@@ -42,0 +57,0 @@ },

import { TargetConfiguration } from '@nrwl/devkit';
export declare function GetBuildExecutorConfiguration(projectName: string): TargetConfiguration;
export declare function GetBuildExecutorConfiguration(projectName: string): BuildExecutorConfiguration;
export interface BuildExecutorConfiguration extends TargetConfiguration {
options: {
output: string;
configuration: 'Debug' | 'Release';
};
}
import { TargetConfiguration } from '@nrwl/devkit';
export declare function GetServeExecutorConfig(): TargetConfiguration;
export declare function GetServeExecutorConfig(): ServeTargetConfiguration;
export interface ServeTargetConfiguration extends TargetConfiguration {
options: {
configuration: 'Debug' | 'Release';
};
}
import { TargetConfiguration } from "@nrwl/devkit";
export declare function GetTestExecutorConfig(): TargetConfiguration;
export declare function GetTestExecutorConfig(projectName?: string): TestTargetConfiguration;
export interface TestTargetConfiguration extends TargetConfiguration {
options: {
/**
* If null, implicitly this must be the test project.
* Else, run this target on the testProject instead of
* the executor's target.
*/
testProject?: string;
};
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetTestExecutorConfig = void 0;
function GetTestExecutorConfig() {
function GetTestExecutorConfig(projectName) {
return ({
executor: '@nx-dotnet/core:test'
executor: '@nx-dotnet/core:test',
options: {
testProject: projectName
}
});

@@ -8,0 +11,0 @@ }

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

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