create-nx-workspace
Advanced tools
Comparing version
@@ -67,1 +67,2 @@ import * as yargs from 'yargs'; | ||
export {}; | ||
//# sourceMappingURL=create-nx-workspace.d.ts.map |
@@ -13,1 +13,2 @@ export declare const yargsDecorator: { | ||
}; | ||
//# sourceMappingURL=decorator.d.ts.map |
#!/usr/bin/env node | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
export declare const bundlerList: string[]; | ||
export type Bundler = (typeof bundlerList)[number]; | ||
//# sourceMappingURL=bundler-list.d.ts.map |
export declare const frameworkList: string[]; | ||
export type Framework = (typeof frameworkList)[number]; | ||
//# sourceMappingURL=framework-list.d.ts.map |
export * from './src/create-workspace'; | ||
export type { CreateWorkspaceOptions } from './src/create-workspace-options'; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "create-nx-workspace", | ||
"version": "0.0.0-pr-31936-ec577e9", | ||
"version": "0.0.0-pr-31972-10aac5e", | ||
"private": false, | ||
@@ -45,5 +45,5 @@ "description": "Smart Repos · Fast Builds", | ||
}, | ||
"types": "./index.d.ts", | ||
"main": "./index.js", | ||
"main": "index.js", | ||
"types": "./src/index.d.ts", | ||
"type": "commonjs" | ||
} |
@@ -12,1 +12,2 @@ import { CreateWorkspaceOptions } from './create-workspace-options'; | ||
export declare function createEmptyWorkspace<T extends CreateWorkspaceOptions>(tmpDir: string, name: string, packageManager: PackageManager, options: T): Promise<string>; | ||
//# sourceMappingURL=create-empty-workspace.d.ts.map |
import { CreateWorkspaceOptions } from './create-workspace-options'; | ||
import { PackageManager } from './utils/package-manager'; | ||
export declare function createPreset<T extends CreateWorkspaceOptions>(preset: string, parsedArgs: T, packageManager: PackageManager, directory: string): Promise<void>; | ||
//# sourceMappingURL=create-preset.d.ts.map |
@@ -10,2 +10,6 @@ "use strict"; | ||
const { skipGit, commit, nxCloud, ...restArgs } = parsedArgs; | ||
// Delete verbose because it will conflict with the --quiet flag | ||
if (!restArgs.verbose) { | ||
delete restArgs.verbose; | ||
} | ||
let args = (0, unparse_1.unparse)({ | ||
@@ -12,0 +16,0 @@ interactive: true, |
@@ -8,1 +8,2 @@ import { PackageManager } from './utils/package-manager'; | ||
export declare function createSandbox(packageManager: PackageManager): Promise<string>; | ||
//# sourceMappingURL=create-sandbox.d.ts.map |
@@ -40,1 +40,2 @@ import { NxCloud } from './utils/nx/nx-cloud'; | ||
} | ||
//# sourceMappingURL=create-workspace-options.d.ts.map |
import { CreateWorkspaceOptions } from './create-workspace-options'; | ||
import { VcsPushStatus } from './utils/git/git'; | ||
export declare function createWorkspace<T extends CreateWorkspaceOptions>(preset: string, options: T, rawArgs?: T): Promise<{ | ||
nxCloudInfo: string | undefined; | ||
nxCloudInfo: string; | ||
directory: string; | ||
@@ -9,1 +9,2 @@ pushedToVcs: VcsPushStatus; | ||
export declare function extractConnectUrl(text: string): string | null; | ||
//# sourceMappingURL=create-workspace.d.ts.map |
@@ -17,1 +17,2 @@ import * as yargs from 'yargs'; | ||
}>): Promise<PackageManager>; | ||
//# sourceMappingURL=prompts.d.ts.map |
import yargs = require('yargs'); | ||
export declare function withNxCloud<T = unknown>(argv: yargs.Argv<T>): yargs.Argv<T & { | ||
nxCloud: string | undefined; | ||
nxCloud: string; | ||
}>; | ||
@@ -12,6 +12,6 @@ export declare function withUseGitHub<T = unknown>(argv: yargs.Argv<T>): yargs.Argv<T & { | ||
export declare function withPackageManager<T = unknown>(argv: yargs.Argv<T>): yargs.Argv<T & { | ||
packageManager: string | undefined; | ||
packageManager: string; | ||
}>; | ||
export declare function withGitOptions<T = unknown>(argv: yargs.Argv<T>): yargs.Argv<T & { | ||
defaultBase: string | undefined; | ||
defaultBase: string; | ||
} & { | ||
@@ -24,5 +24,5 @@ skipGit: boolean; | ||
} & { | ||
"commit.name": string | undefined; | ||
"commit.name": string; | ||
} & { | ||
"commit.email": string | undefined; | ||
"commit.email": string; | ||
} & { | ||
@@ -32,1 +32,2 @@ "commit.message": string; | ||
export declare function withOptions<T>(argv: yargs.Argv<T>, ...options: ((argv: yargs.Argv<T>) => yargs.Argv<T>)[]): any; | ||
//# sourceMappingURL=yargs-options.d.ts.map |
@@ -9,1 +9,2 @@ /** | ||
}>; | ||
//# sourceMappingURL=child-process-utils.d.ts.map |
export declare function isCI(): boolean; | ||
//# sourceMappingURL=is-ci.d.ts.map |
@@ -6,1 +6,2 @@ import { PackageManager } from '../package-manager'; | ||
}>; | ||
//# sourceMappingURL=setup-ci.d.ts.map |
@@ -8,1 +8,2 @@ export declare class CreateNxWorkspaceError extends Error { | ||
export declare function mapErrorToBodyLines(error: Error): string[]; | ||
//# sourceMappingURL=error-utils.d.ts.map |
export declare function deduceDefaultBase(): string; | ||
//# sourceMappingURL=default-base.d.ts.map |
@@ -27,1 +27,2 @@ export declare enum VcsPushStatus { | ||
}): Promise<VcsPushStatus>; | ||
//# sourceMappingURL=git.d.ts.map |
@@ -134,4 +134,4 @@ "use strict"; | ||
try { | ||
if (process.env['NX_SKIP_GH_PUSH'] === 'false') { | ||
throw new GitHubPushSkippedError('NX_SKIP_GH_PUSH is false so skipping GitHub push.'); | ||
if (process.env['NX_SKIP_GH_PUSH'] === 'true') { | ||
throw new GitHubPushSkippedError('NX_SKIP_GH_PUSH is true so skipping GitHub push.'); | ||
} | ||
@@ -188,4 +188,4 @@ const username = await getGitHubUsername(directory); | ||
const repoUrl = repoResult.stdout.trim(); | ||
output_1.output.log({ | ||
title: `Successfully created and pushed to GitHub repository: ${repoUrl}`, | ||
output_1.output.success({ | ||
title: `Successfully pushed to GitHub repository: ${repoUrl}`, | ||
}); | ||
@@ -192,0 +192,0 @@ return VcsPushStatus.PushedToVcs; |
@@ -36,1 +36,2 @@ export declare const NxCloudChoices: string[]; | ||
export {}; | ||
//# sourceMappingURL=ab-testing.d.ts.map |
@@ -34,3 +34,3 @@ "use strict"; | ||
], | ||
footer: '\nRemote caching, task distribution and test splitting are provided by Nx Cloud. Read more at https://nx.dev/ci', | ||
footer: '\nSelf-healing CI, remote caching, and task distribution are provided by Nx Cloud: https://nx.dev/nx-cloud', | ||
fallback: { value: 'skip', key: 'setupNxCloud' }, | ||
@@ -37,0 +37,0 @@ }, |
@@ -0,5 +1,6 @@ | ||
import { VcsPushStatus } from '../git/git'; | ||
declare const outputMessages: { | ||
readonly 'create-nx-workspace-success-ci-setup': readonly [{ | ||
readonly code: "ci-setup-visit"; | ||
readonly createMessage: (url: string | null, pushedToVcs: boolean) => { | ||
readonly createMessage: (url: string | null, pushedToVcs: VcsPushStatus) => { | ||
title: string; | ||
@@ -12,3 +13,3 @@ type: string; | ||
readonly code: "remote-cache-visit"; | ||
readonly createMessage: (url: string | null, pushedToVcs: boolean) => { | ||
readonly createMessage: (url: string | null, pushedToVcs: VcsPushStatus) => { | ||
title: string; | ||
@@ -23,3 +24,3 @@ type: string; | ||
readonly code: "ci-setup-visit"; | ||
readonly createMessage: (url: string | null, pushedToVcs: boolean) => { | ||
readonly createMessage: (url: string | null, pushedToVcs: VcsPushStatus) => { | ||
title: string; | ||
@@ -31,3 +32,3 @@ type: string; | ||
readonly code: "remote-cache-visit"; | ||
readonly createMessage: (url: string | null, pushedToVcs: boolean) => { | ||
readonly createMessage: (url: string | null, pushedToVcs: VcsPushStatus) => { | ||
title: string; | ||
@@ -39,1 +40,2 @@ type: string; | ||
export {}; | ||
//# sourceMappingURL=messages.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMessageFactory = getMessageFactory; | ||
const git_1 = require("../git/git"); | ||
function getSetupMessage(url, pushedToVcs) { | ||
if (pushedToVcs === git_1.VcsPushStatus.PushedToVcs) { | ||
return url | ||
? `Go to Nx Cloud and finish the setup: ${url}` | ||
: 'Return to Nx Cloud and finish the setup'; | ||
} | ||
// Default case: FailedToPushToVcs | ||
const action = url ? 'go' : 'return'; | ||
const urlSuffix = url ? `: ${url}` : ''; | ||
return `Push your repo, then ${action} to Nx Cloud and finish the setup${urlSuffix}`; | ||
} | ||
const outputMessages = { | ||
@@ -12,9 +24,3 @@ 'create-nx-workspace-success-ci-setup': [ | ||
type: 'success', | ||
bodyLines: [ | ||
`${pushedToVcs | ||
? url | ||
? `Go to Nx Cloud and finish the setup: ${url}` | ||
: 'Return to Nx Cloud and finish the setup' | ||
: `Once you have pushed your repo, ${url ? 'go' : 'return'} to Nx Cloud and finish the setup${url ? `: ${url}` : ''}`}`, | ||
], | ||
bodyLines: [getSetupMessage(url, pushedToVcs)], | ||
}; | ||
@@ -32,7 +38,3 @@ }, | ||
bodyLines: [ | ||
`${pushedToVcs | ||
? url | ||
? `Go to Nx Cloud and finish the setup: ${url}` | ||
: 'Return to Nx Cloud and finish the setup' | ||
: `Once you have pushed your repo, ${url ? 'go' : 'return'} to Nx Cloud and finish the setup${url ? `: ${url}` : ''}`}`, | ||
getSetupMessage(url, pushedToVcs), | ||
`You can also set up a remote cache later by running \`nx g @nx/nx-cloud:init\``, | ||
@@ -39,0 +41,0 @@ ], |
import { VcsPushStatus } from '../git/git'; | ||
export type NxCloud = 'yes' | 'github' | 'gitlab' | 'azure' | 'bitbucket-pipelines' | 'circleci' | 'skip'; | ||
export declare function readNxCloudToken(directory: string): string | undefined; | ||
export declare function readNxCloudToken(directory: string): string; | ||
export declare function createNxCloudOnboardingUrl(nxCloud: NxCloud, token: string, directory: string, useGitHub?: boolean): Promise<string>; | ||
export declare function getNxCloudInfo(nxCloud: NxCloud, connectCloudUrl: string, pushedToVcs: VcsPushStatus, rawNxCloud?: NxCloud): Promise<string>; | ||
//# sourceMappingURL=nx-cloud.d.ts.map |
@@ -6,3 +6,2 @@ "use strict"; | ||
exports.getNxCloudInfo = getNxCloudInfo; | ||
const git_1 = require("../git/git"); | ||
const output_1 = require("../output"); | ||
@@ -43,3 +42,3 @@ const messages_1 = require("./messages"); | ||
const out = new output_1.CLIOutput(false); | ||
const message = createMessage(typeof rawNxCloud === 'string' ? null : connectCloudUrl, pushedToVcs === git_1.VcsPushStatus.PushedToVcs); | ||
const message = createMessage(typeof rawNxCloud === 'string' ? null : connectCloudUrl, pushedToVcs); | ||
if (message.type === 'success') { | ||
@@ -46,0 +45,0 @@ out.success(message); |
export declare const nxVersion: any; | ||
//# sourceMappingURL=nx-version.d.ts.map |
@@ -47,3 +47,3 @@ import * as chalk from 'chalk'; | ||
setCliName(name: string): void; | ||
applyCLIPrefix(color: string | undefined, text: string): string; | ||
applyCLIPrefix(color: string, text: string): string; | ||
addNewline(): void; | ||
@@ -63,1 +63,2 @@ addVerticalSeparator(color?: string): void; | ||
export declare const output: CLIOutput; | ||
//# sourceMappingURL=output.d.ts.map |
@@ -36,1 +36,2 @@ export declare const packageManagerList: readonly ["pnpm", "yarn", "npm", "bun"]; | ||
export declare function detectInvokedPackageManager(): PackageManager; | ||
//# sourceMappingURL=package-manager.d.ts.map |
@@ -10,1 +10,2 @@ /** | ||
export declare function getPackageNameFromThirdPartyPreset(preset?: string): string | undefined; | ||
//# sourceMappingURL=get-third-party-preset.d.ts.map |
@@ -33,1 +33,2 @@ export declare enum Preset { | ||
export declare function isKnownPreset(preset: string): preset is Preset; | ||
//# sourceMappingURL=preset.d.ts.map |
export declare function printSocialInformation(): void; | ||
//# sourceMappingURL=social-information.d.ts.map |
export declare function stringifyCollection(items: string[]): string; | ||
//# sourceMappingURL=string-utils.d.ts.map |
export declare function unparse(options: Object): string[]; | ||
//# sourceMappingURL=unparse.d.ts.map |
@@ -12,1 +12,2 @@ /** | ||
export declare function validateNpmPackage(name: string): ValidateNpmResult; | ||
//# sourceMappingURL=validate-npm-package.d.ts.map |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
144038
16.02%97
49.23%3430
2.6%25
4.17%