Socket
Socket
Sign inDemoInstall

create-nx-workspace

Package Overview
Dependencies
Maintainers
0
Versions
1687
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-nx-workspace - npm Package Compare versions

Comparing version 19.6.0-canary.20240801-2111841 to 19.6.0-canary.20240803-bd7a2c9

2

package.json
{
"name": "create-nx-workspace",
"version": "19.6.0-canary.20240801-2111841",
"version": "19.6.0-canary.20240803-bd7a2c9",
"private": false,

@@ -5,0 +5,0 @@ "description": "Smart Monorepos · Fast CI",

@@ -32,3 +32,3 @@ "use strict";

if (nxCloud !== 'skip') {
const token = await (0, nx_cloud_1.setupNxCloud)(directory, nxCloud, useGitHub);
const token = (0, nx_cloud_1.readNxCloudToken)(directory);
if (nxCloud !== 'yes') {

@@ -35,0 +35,0 @@ await (0, setup_ci_1.setupCI)(directory, nxCloud, packageManager);

export type NxCloud = 'yes' | 'github' | 'circleci' | 'skip';
export declare function setupNxCloud(directory: string, nxCloud: NxCloud, useGitHub?: boolean): Promise<string>;
export declare function readNxCloudToken(directory: string): string | undefined;
export declare function getOnboardingInfo(nxCloud: NxCloud, token: string, directory: string, useGithub?: boolean): Promise<{

@@ -4,0 +4,0 @@ output: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setupNxCloud = setupNxCloud;
exports.readNxCloudToken = readNxCloudToken;
exports.getOnboardingInfo = getOnboardingInfo;
const ora = require("ora");
const output_1 = require("../output");
const error_utils_1 = require("../error-utils");
const messages_1 = require("./messages");
async function setupNxCloud(directory, nxCloud, useGitHub) {
const nxCloudSpinner = ora(`Setting up Nx Cloud`).start();
try {
// nx-ignore-next-line
const { connectWorkspaceToCloud } = require(require.resolve('nx/src/command-line/connect/connect-to-nx-cloud', {
paths: [directory],
}
// nx-ignore-next-line
));
const accessToken = await connectWorkspaceToCloud({
installationSource: 'create-nx-workspace',
directory,
github: useGitHub,
});
nxCloudSpinner.succeed('Nx Cloud has been set up successfully');
return accessToken;
const ora = require("ora");
function readNxCloudToken(directory) {
const nxCloudSpinner = ora(`Checking Nx Cloud setup`).start();
// nx-ignore-next-line
const { getCloudOptions } = require(require.resolve('nx/src/nx-cloud/utilities/get-cloud-options', {
paths: [directory],
}
catch (e) {
nxCloudSpinner.fail();
if (e instanceof Error) {
output_1.output.error({
title: `Failed to setup Nx Cloud`,
bodyLines: (0, error_utils_1.mapErrorToBodyLines)(e),
});
}
else {
console.error(e);
}
process.exit(1);
}
finally {
nxCloudSpinner.stop();
}
// nx-ignore-next-line
));
const { accessToken } = getCloudOptions(directory);
nxCloudSpinner.succeed('Nx Cloud has been set up successfully');
return accessToken;
}

@@ -43,0 +20,0 @@ async function getOnboardingInfo(nxCloud, token, directory, useGithub) {

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