Socket
Socket
Sign inDemoInstall

create-nx-workspace

Package Overview
Dependencies
Maintainers
7
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.5.6 to 19.5.7

1

bin/create-nx-workspace.js

@@ -124,2 +124,3 @@ "use strict";

ab_testing_1.messages.codeOfSelectedPromptMessage('setupNxCloud'),
parsedArgs.nxCloud,
],

@@ -126,0 +127,0 @@ });

2

package.json
{
"name": "create-nx-workspace",
"version": "19.5.6",
"version": "19.5.7",
"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);

declare const outputMessages: {
readonly 'create-nx-workspace-success-ci-setup': readonly [{
readonly code: "nx-cloud-workspace-push-goto";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "nx-cloud-powered-ci-setup-visit";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "nx-cloud-powered-ci-setup-connect";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "ci-setup-visit";

@@ -30,60 +9,4 @@ readonly createMessage: (url: string) => {

};
}, {
readonly code: "ci-setup-connect";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "nx-cloud-powered-ci-setup-visit-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "nx-cloud-powered-ci-setup-connect-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "ci-setup-visit-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "ci-setup-connect-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}];
readonly 'create-nx-workspace-success-cache-setup': readonly [{
readonly code: "nx-cloud-workspace-push-goto";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "nx-cloud-remote-cache-setup-finish";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "nx-cloud-remote-cache-setup-connect";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "remote-cache-visit";

@@ -95,37 +18,2 @@ readonly createMessage: (url: string) => {

};
}, {
readonly code: "remote-cache-connect";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "nx-cloud-remote-cache-setup-visit-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "nx-cloud-remote-cache-setup-connect-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "remote-cache-visit-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}, {
readonly code: "remote-cache-connect-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
}];

@@ -135,23 +23,2 @@ };

export declare function getMessageFactory(key: OutputMessageKey): {
readonly code: "nx-cloud-workspace-push-goto";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "nx-cloud-powered-ci-setup-visit";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "nx-cloud-powered-ci-setup-connect";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "ci-setup-visit";

@@ -164,58 +31,2 @@ readonly createMessage: (url: string) => {

} | {
readonly code: "ci-setup-connect";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "nx-cloud-powered-ci-setup-visit-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "nx-cloud-powered-ci-setup-connect-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "ci-setup-visit-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "ci-setup-connect-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "nx-cloud-workspace-push-goto";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "nx-cloud-remote-cache-setup-finish";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "nx-cloud-remote-cache-setup-connect";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "remote-cache-visit";

@@ -227,38 +38,3 @@ readonly createMessage: (url: string) => {

};
} | {
readonly code: "remote-cache-connect";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "nx-cloud-remote-cache-setup-visit-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "nx-cloud-remote-cache-setup-connect-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "remote-cache-visit-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
} | {
readonly code: "remote-cache-connect-warn";
readonly createMessage: (url: string) => {
title: string;
type: string;
bodyLines: string[];
};
};
export {};

@@ -7,32 +7,2 @@ "use strict";

{
code: 'nx-cloud-workspace-push-goto',
createMessage: (url) => ({
title: `Your Nx Cloud workspace is ready.`,
type: 'success',
bodyLines: [
`To claim it, connect it to your Nx Cloud account:`,
`- Push your repository to your git hosting provider.`,
`- Go to the following URL to connect your workspace to Nx Cloud:`,
'',
`${url}`,
],
}),
},
{
code: 'nx-cloud-powered-ci-setup-visit',
createMessage: (url) => ({
title: `Your CI setup powered by Nx Cloud is almost complete.`,
type: 'success',
bodyLines: [`Finish it by visiting: ${url}`],
}),
},
{
code: 'nx-cloud-powered-ci-setup-connect',
createMessage: (url) => ({
title: `Your CI setup powered by Nx Cloud is almost complete.`,
type: 'success',
bodyLines: [`Connect your repository: ${url}`],
}),
},
{
code: 'ci-setup-visit',

@@ -45,75 +15,5 @@ createMessage: (url) => ({

},
{
code: 'ci-setup-connect',
createMessage: (url) => ({
title: `Your CI setup is almost complete.`,
type: 'success',
bodyLines: [`Connect your repository: ${url}`],
}),
},
{
code: 'nx-cloud-powered-ci-setup-visit-warn',
createMessage: (url) => ({
title: `Your CI setup powered by Nx Cloud is almost complete.`,
type: 'warning',
bodyLines: [`Finish it by visiting: ${url}`],
}),
},
{
code: 'nx-cloud-powered-ci-setup-connect-warn',
createMessage: (url) => ({
title: `Your CI setup powered by Nx Cloud is almost complete.`,
type: 'warning',
bodyLines: [`Connect your repository: ${url}`],
}),
},
{
code: 'ci-setup-visit-warn',
createMessage: (url) => ({
title: `Your CI setup is almost complete.`,
type: 'warning',
bodyLines: [`Finish it by visiting: ${url}`],
}),
},
{
code: 'ci-setup-connect-warn',
createMessage: (url) => ({
title: `Your CI setup is almost complete.`,
type: 'warning',
bodyLines: [`Connect your repository: ${url}`],
}),
},
],
'create-nx-workspace-success-cache-setup': [
{
code: 'nx-cloud-workspace-push-goto',
createMessage: (url) => ({
title: `Your Nx Cloud workspace is ready.`,
type: 'success',
bodyLines: [
`To claim it, connect it to your Nx Cloud account:`,
`- Push your repository to your git hosting provider.`,
`- Go to the following URL to connect your workspace to Nx Cloud:`,
'',
`${url}`,
],
}),
},
{
code: 'nx-cloud-remote-cache-setup-finish',
createMessage: (url) => ({
title: `Your Nx Cloud remote cache setup is almost complete.`,
type: 'success',
bodyLines: [`Finish it by visiting: ${url}`],
}),
},
{
code: 'nx-cloud-remote-cache-setup-connect',
createMessage: (url) => ({
title: `Your Nx Cloud remote cache setup is almost complete.`,
type: 'success',
bodyLines: [`Connect your repository: ${url}`],
}),
},
{
code: 'remote-cache-visit',

@@ -126,42 +26,2 @@ createMessage: (url) => ({

},
{
code: 'remote-cache-connect',
createMessage: (url) => ({
title: `Your remote cache setup is almost complete.`,
type: 'success',
bodyLines: [`Connect your repository: ${url}`],
}),
},
{
code: 'nx-cloud-remote-cache-setup-visit-warn',
createMessage: (url) => ({
title: `Your Nx Cloud remote cache setup is almost complete.`,
type: 'warning',
bodyLines: [`Finish it by visiting: ${url}`],
}),
},
{
code: 'nx-cloud-remote-cache-setup-connect-warn',
createMessage: (url) => ({
title: `Your Nx Cloud remote cache setup is almost complete.`,
type: 'warning',
bodyLines: [`Connect your repository: ${url}`],
}),
},
{
code: 'remote-cache-visit-warn',
createMessage: (url) => ({
title: `Your remote cache setup is almost complete.`,
type: 'warning',
bodyLines: [`Finish it by visiting: ${url}`],
}),
},
{
code: 'remote-cache-connect-warn',
createMessage: (url) => ({
title: `Your remote cache setup is almost complete.`,
type: 'warning',
bodyLines: [`Connect your repository: ${url}`],
}),
},
],

@@ -168,0 +28,0 @@ };

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,
}, directory);
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