@nx/js 0.0.0-pr-22179-271588f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +68 -0
- package/babel.d.ts +13 -0
- package/babel.js +91 -0
- package/executors.json +32 -0
- package/generators.json +46 -0
- package/migrations.json +159 -0
- package/package.json +76 -0
- package/plugins/jest/local-registry.d.ts +1 -0
- package/plugins/jest/local-registry.js +4 -0
- package/src/executors/node/lib/kill-tree.d.ts +2 -0
- package/src/executors/node/lib/kill-tree.js +114 -0
- package/src/executors/node/node-with-require-overrides.d.ts +7 -0
- package/src/executors/node/node-with-require-overrides.js +21 -0
- package/src/executors/node/node.impl.d.ts +7 -0
- package/src/executors/node/node.impl.js +288 -0
- package/src/executors/node/schema.d.ts +18 -0
- package/src/executors/node/schema.json +92 -0
- package/src/executors/release-publish/format-bytes.d.ts +1 -0
- package/src/executors/release-publish/format-bytes.js +28 -0
- package/src/executors/release-publish/log-tar.d.ts +1 -0
- package/src/executors/release-publish/log-tar.js +68 -0
- package/src/executors/release-publish/release-publish.impl.d.ts +5 -0
- package/src/executors/release-publish/release-publish.impl.js +198 -0
- package/src/executors/release-publish/schema.d.ts +8 -0
- package/src/executors/release-publish/schema.json +26 -0
- package/src/executors/swc/schema.json +154 -0
- package/src/executors/swc/swc.impl.d.ts +10 -0
- package/src/executors/swc/swc.impl.js +149 -0
- package/src/executors/tsc/lib/batch/build-task-info-per-tsconfig-map.d.ts +5 -0
- package/src/executors/tsc/lib/batch/build-task-info-per-tsconfig-map.js +62 -0
- package/src/executors/tsc/lib/batch/index.d.ts +4 -0
- package/src/executors/tsc/lib/batch/index.js +7 -0
- package/src/executors/tsc/lib/batch/normalize-tasks-options.d.ts +3 -0
- package/src/executors/tsc/lib/batch/normalize-tasks-options.js +14 -0
- package/src/executors/tsc/lib/batch/types.d.ts +17 -0
- package/src/executors/tsc/lib/batch/types.js +2 -0
- package/src/executors/tsc/lib/batch/watch.d.ts +3 -0
- package/src/executors/tsc/lib/batch/watch.js +56 -0
- package/src/executors/tsc/lib/get-custom-transformers-factory.d.ts +3 -0
- package/src/executors/tsc/lib/get-custom-transformers-factory.js +13 -0
- package/src/executors/tsc/lib/get-task-options.d.ts +3 -0
- package/src/executors/tsc/lib/get-task-options.js +34 -0
- package/src/executors/tsc/lib/get-tsconfig.d.ts +4 -0
- package/src/executors/tsc/lib/get-tsconfig.js +86 -0
- package/src/executors/tsc/lib/index.d.ts +4 -0
- package/src/executors/tsc/lib/index.js +7 -0
- package/src/executors/tsc/lib/normalize-options.d.ts +2 -0
- package/src/executors/tsc/lib/normalize-options.js +39 -0
- package/src/executors/tsc/lib/typescript-compilation.d.ts +29 -0
- package/src/executors/tsc/lib/typescript-compilation.js +203 -0
- package/src/executors/tsc/lib/typescript-diagnostic-reporters.d.ts +3 -0
- package/src/executors/tsc/lib/typescript-diagnostic-reporters.js +37 -0
- package/src/executors/tsc/schema.json +163 -0
- package/src/executors/tsc/tsc.batch-impl.d.ts +5 -0
- package/src/executors/tsc/tsc.batch-impl.js +180 -0
- package/src/executors/tsc/tsc.impl.d.ts +7 -0
- package/src/executors/tsc/tsc.impl.js +97 -0
- package/src/executors/verdaccio/schema.d.ts +7 -0
- package/src/executors/verdaccio/schema.json +35 -0
- package/src/executors/verdaccio/verdaccio.impl.d.ts +12 -0
- package/src/executors/verdaccio/verdaccio.impl.js +220 -0
- package/src/generators/convert-to-swc/convert-to-swc.d.ts +4 -0
- package/src/generators/convert-to-swc/convert-to-swc.js +59 -0
- package/src/generators/convert-to-swc/schema.d.ts +4 -0
- package/src/generators/convert-to-swc/schema.json +36 -0
- package/src/generators/init/files/__fileName__ +20 -0
- package/src/generators/init/init.d.ts +4 -0
- package/src/generators/init/init.js +114 -0
- package/src/generators/init/schema.d.ts +7 -0
- package/src/generators/init/schema.json +36 -0
- package/src/generators/library/files/jest-config/jest.config.__ext__ +30 -0
- package/src/generators/library/files/lib/src/index.ts__tmpl__ +1 -0
- package/src/generators/library/files/lib/src/lib/__fileName__.spec.ts__tmpl__ +7 -0
- package/src/generators/library/files/lib/src/lib/__fileName__.ts__tmpl__ +3 -0
- package/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ +14 -0
- package/src/generators/library/files/readme/README.md +19 -0
- package/src/generators/library/library.d.ts +16 -0
- package/src/generators/library/library.js +751 -0
- package/src/generators/library/schema.json +151 -0
- package/src/generators/release-version/release-version.d.ts +5 -0
- package/src/generators/release-version/release-version.js +390 -0
- package/src/generators/release-version/schema.d.ts +1 -0
- package/src/generators/release-version/schema.json +67 -0
- package/src/generators/release-version/test-utils/create-workspace-with-package-dependencies.d.ts +16 -0
- package/src/generators/release-version/test-utils/create-workspace-with-package-dependencies.js +40 -0
- package/src/generators/release-version/utils/package.d.ts +12 -0
- package/src/generators/release-version/utils/package.js +34 -0
- package/src/generators/release-version/utils/resolve-local-package-dependencies.d.ts +12 -0
- package/src/generators/release-version/utils/resolve-local-package-dependencies.js +78 -0
- package/src/generators/release-version/utils/resolve-version-spec.d.ts +1 -0
- package/src/generators/release-version/utils/resolve-version-spec.js +29 -0
- package/src/generators/release-version/utils/update-lock-file.d.ts +5 -0
- package/src/generators/release-version/utils/update-lock-file.js +105 -0
- package/src/generators/setup-build/generator.d.ts +4 -0
- package/src/generators/setup-build/generator.js +142 -0
- package/src/generators/setup-build/schema.d.ts +7 -0
- package/src/generators/setup-build/schema.json +42 -0
- package/src/generators/setup-verdaccio/files/config.yml +28 -0
- package/src/generators/setup-verdaccio/generator.d.ts +4 -0
- package/src/generators/setup-verdaccio/generator.js +56 -0
- package/src/generators/setup-verdaccio/schema.d.ts +3 -0
- package/src/generators/setup-verdaccio/schema.json +16 -0
- package/src/index.d.ts +17 -0
- package/src/index.js +28 -0
- package/src/internal.d.ts +4 -0
- package/src/internal.js +15 -0
- package/src/migrations/update-15-8-0/rename-swcrc-config.d.ts +2 -0
- package/src/migrations/update-15-8-0/rename-swcrc-config.js +77 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +9 -0
- package/src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps.d.ts +2 -0
- package/src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps.js +34 -0
- package/src/migrations/update-16-8-2/update-swcrc.d.ts +2 -0
- package/src/migrations/update-16-8-2/update-swcrc.js +23 -0
- package/src/migrations/update-17-0-0/remove-deprecated-build-options.d.ts +6 -0
- package/src/migrations/update-17-0-0/remove-deprecated-build-options.js +30 -0
- package/src/plugins/jest/start-local-registry.d.ts +12 -0
- package/src/plugins/jest/start-local-registry.js +63 -0
- package/src/plugins/rollup/type-definitions.d.ts +8 -0
- package/src/plugins/rollup/type-definitions.js +48 -0
- package/src/utils/add-babel-inputs.d.ts +3 -0
- package/src/utils/add-babel-inputs.js +23 -0
- package/src/utils/add-local-registry-scripts.d.ts +5 -0
- package/src/utils/add-local-registry-scripts.js +77 -0
- package/src/utils/assets/assets.d.ts +10 -0
- package/src/utils/assets/assets.js +36 -0
- package/src/utils/assets/copy-assets-handler.d.ts +32 -0
- package/src/utils/assets/copy-assets-handler.js +154 -0
- package/src/utils/assets/index.d.ts +16 -0
- package/src/utils/assets/index.js +27 -0
- package/src/utils/buildable-libs-utils.d.ts +43 -0
- package/src/utils/buildable-libs-utils.js +375 -0
- package/src/utils/check-dependencies.d.ts +8 -0
- package/src/utils/check-dependencies.js +23 -0
- package/src/utils/code-frames/highlight.d.ts +1 -0
- package/src/utils/code-frames/highlight.js +86 -0
- package/src/utils/code-frames/identifiers.d.ts +5 -0
- package/src/utils/code-frames/identifiers.js +52 -0
- package/src/utils/compiler-helper-dependency.d.ts +18 -0
- package/src/utils/compiler-helper-dependency.js +120 -0
- package/src/utils/find-npm-dependencies.d.ts +9 -0
- package/src/utils/find-npm-dependencies.js +140 -0
- package/src/utils/generate-globs.d.ts +6 -0
- package/src/utils/generate-globs.js +80 -0
- package/src/utils/get-import-path.d.ts +5 -0
- package/src/utils/get-import-path.js +14 -0
- package/src/utils/get-main-file-dir.d.ts +1 -0
- package/src/utils/get-main-file-dir.js +11 -0
- package/src/utils/inline.d.ts +19 -0
- package/src/utils/inline.js +210 -0
- package/src/utils/package-json/create-entry-points.d.ts +1 -0
- package/src/utils/package-json/create-entry-points.js +23 -0
- package/src/utils/package-json/get-npm-scope.d.ts +5 -0
- package/src/utils/package-json/get-npm-scope.js +16 -0
- package/src/utils/package-json/index.d.ts +13 -0
- package/src/utils/package-json/index.js +30 -0
- package/src/utils/package-json/update-package-json.d.ts +30 -0
- package/src/utils/package-json/update-package-json.js +179 -0
- package/src/utils/prettier.d.ts +6 -0
- package/src/utils/prettier.js +34 -0
- package/src/utils/schema.d.ts +87 -0
- package/src/utils/swc/add-swc-config.d.ts +3 -0
- package/src/utils/swc/add-swc-config.js +41 -0
- package/src/utils/swc/add-swc-dependencies.d.ts +3 -0
- package/src/utils/swc/add-swc-dependencies.js +18 -0
- package/src/utils/swc/compile-swc.d.ts +13 -0
- package/src/utils/swc/compile-swc.js +160 -0
- package/src/utils/swc/get-swcrc-path.d.ts +5 -0
- package/src/utils/swc/get-swcrc-path.js +15 -0
- package/src/utils/swc/inline.d.ts +2 -0
- package/src/utils/swc/inline.js +11 -0
- package/src/utils/typescript/__mocks__/plugin-a.d.ts +1 -0
- package/src/utils/typescript/__mocks__/plugin-a.js +5 -0
- package/src/utils/typescript/__mocks__/plugin-b.d.ts +1 -0
- package/src/utils/typescript/__mocks__/plugin-b.js +5 -0
- package/src/utils/typescript/add-tslib-dependencies.d.ts +2 -0
- package/src/utils/typescript/add-tslib-dependencies.js +11 -0
- package/src/utils/typescript/ast-utils.d.ts +32 -0
- package/src/utils/typescript/ast-utils.js +266 -0
- package/src/utils/typescript/compile-typescript-files.d.ts +10 -0
- package/src/utils/typescript/compile-typescript-files.js +43 -0
- package/src/utils/typescript/create-ts-config.d.ts +18 -0
- package/src/utils/typescript/create-ts-config.js +48 -0
- package/src/utils/typescript/ensure-typescript.d.ts +1 -0
- package/src/utils/typescript/ensure-typescript.js +9 -0
- package/src/utils/typescript/get-source-nodes.d.ts +2 -0
- package/src/utils/typescript/get-source-nodes.js +18 -0
- package/src/utils/typescript/load-ts-transformers.d.ts +5 -0
- package/src/utils/typescript/load-ts-transformers.js +62 -0
- package/src/utils/typescript/print-diagnostics.d.ts +1 -0
- package/src/utils/typescript/print-diagnostics.js +18 -0
- package/src/utils/typescript/run-type-check.d.ts +32 -0
- package/src/utils/typescript/run-type-check.js +128 -0
- package/src/utils/typescript/ts-config.d.ts +9 -0
- package/src/utils/typescript/ts-config.js +85 -0
- package/src/utils/typescript/tsnode-register.d.ts +1 -0
- package/src/utils/typescript/tsnode-register.js +24 -0
- package/src/utils/typescript/types.d.ts +18 -0
- package/src/utils/typescript/types.js +2 -0
- package/src/utils/versions.d.ts +17 -0
- package/src/utils/versions.js +21 -0
- package/src/utils/watch-for-single-file-changes.d.ts +1 -0
- package/src/utils/watch-for-single-file-changes.js +22 -0
package/src/generators/release-version/test-utils/create-workspace-with-package-dependencies.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createWorkspaceWithPackageDependencies = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function createWorkspaceWithPackageDependencies(tree, projectAndPackageData) {
|
|
6
|
+
const projectGraph = {
|
|
7
|
+
nodes: {},
|
|
8
|
+
dependencies: {},
|
|
9
|
+
};
|
|
10
|
+
for (const [projectName, data] of Object.entries(projectAndPackageData)) {
|
|
11
|
+
const packageJsonContents = {
|
|
12
|
+
name: data.packageName,
|
|
13
|
+
version: data.version,
|
|
14
|
+
};
|
|
15
|
+
for (const dependency of data.localDependencies) {
|
|
16
|
+
const dependencyPackageName = projectAndPackageData[dependency.projectName].packageName;
|
|
17
|
+
packageJsonContents[dependency.dependencyCollection] = {
|
|
18
|
+
...packageJsonContents[dependency.dependencyCollection],
|
|
19
|
+
[dependencyPackageName]: dependency.version,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
// add the project and its nx project level dependencies to the projectGraph
|
|
23
|
+
projectGraph.nodes[projectName] = {
|
|
24
|
+
name: projectName,
|
|
25
|
+
type: 'lib',
|
|
26
|
+
data: {
|
|
27
|
+
root: data.projectRoot,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
projectGraph.dependencies[projectName] = data.localDependencies.map((dependency) => ({
|
|
31
|
+
source: projectName,
|
|
32
|
+
target: dependency.projectName,
|
|
33
|
+
type: 'static',
|
|
34
|
+
}));
|
|
35
|
+
// create the package.json in the tree
|
|
36
|
+
(0, devkit_1.writeJson)(tree, data.packageJsonPath, packageJsonContents);
|
|
37
|
+
}
|
|
38
|
+
return projectGraph;
|
|
39
|
+
}
|
|
40
|
+
exports.createWorkspaceWithPackageDependencies = createWorkspaceWithPackageDependencies;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PackageJson } from 'nx/src/utils/package-json';
|
|
2
|
+
export declare class Package {
|
|
3
|
+
private packageJson;
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
location: string;
|
|
7
|
+
constructor(packageJson: PackageJson, workspaceRoot: string, workspaceRelativeLocation: string);
|
|
8
|
+
getLocalDependency(depName: string): {
|
|
9
|
+
collection: 'dependencies' | 'devDependencies' | 'optionalDependencies';
|
|
10
|
+
spec: string;
|
|
11
|
+
} | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Package = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
class Package {
|
|
6
|
+
constructor(packageJson, workspaceRoot, workspaceRelativeLocation) {
|
|
7
|
+
this.packageJson = packageJson;
|
|
8
|
+
this.name = packageJson.name;
|
|
9
|
+
this.version = packageJson.version;
|
|
10
|
+
this.location = (0, devkit_1.joinPathFragments)(workspaceRoot, workspaceRelativeLocation);
|
|
11
|
+
}
|
|
12
|
+
getLocalDependency(depName) {
|
|
13
|
+
if (this.packageJson.dependencies?.[depName]) {
|
|
14
|
+
return {
|
|
15
|
+
collection: 'dependencies',
|
|
16
|
+
spec: this.packageJson.dependencies[depName],
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (this.packageJson.devDependencies?.[depName]) {
|
|
20
|
+
return {
|
|
21
|
+
collection: 'devDependencies',
|
|
22
|
+
spec: this.packageJson.devDependencies[depName],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (this.packageJson.optionalDependencies?.[depName]) {
|
|
26
|
+
return {
|
|
27
|
+
collection: 'optionalDependencies',
|
|
28
|
+
spec: this.packageJson.optionalDependencies[depName],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.Package = Package;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ProjectGraph, ProjectGraphDependency, ProjectGraphProjectNode, Tree } from '@nx/devkit';
|
|
2
|
+
interface LocalPackageDependency extends ProjectGraphDependency {
|
|
3
|
+
/**
|
|
4
|
+
* The rawVersionSpec contains the value of the version spec as it was defined in the package.json
|
|
5
|
+
* of the dependent project. This can be useful in cases where the version spec is a range, path or
|
|
6
|
+
* workspace reference, and it needs to be be reverted to that original value as part of the release.
|
|
7
|
+
*/
|
|
8
|
+
rawVersionSpec: string;
|
|
9
|
+
dependencyCollection: 'dependencies' | 'devDependencies' | 'optionalDependencies';
|
|
10
|
+
}
|
|
11
|
+
export declare function resolveLocalPackageDependencies(tree: Tree, projectGraph: ProjectGraph, filteredProjects: ProjectGraphProjectNode[], projectNameToPackageRootMap: Map<string, string>, resolvePackageRoot: (projectNode: ProjectGraphProjectNode) => string, includeAll?: boolean): Record<string, LocalPackageDependency[]>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveLocalPackageDependencies = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const semver_1 = require("semver");
|
|
6
|
+
const package_1 = require("./package");
|
|
7
|
+
const resolve_version_spec_1 = require("./resolve-version-spec");
|
|
8
|
+
function resolveLocalPackageDependencies(tree, projectGraph, filteredProjects, projectNameToPackageRootMap, resolvePackageRoot, includeAll = false) {
|
|
9
|
+
const localPackageDependencies = {};
|
|
10
|
+
const projectNodeToPackageMap = new Map();
|
|
11
|
+
const projects = includeAll
|
|
12
|
+
? Object.values(projectGraph.nodes)
|
|
13
|
+
: filteredProjects;
|
|
14
|
+
// Iterate through the projects being released and resolve any relevant package.json data
|
|
15
|
+
for (const projectNode of projects) {
|
|
16
|
+
// Resolve the package.json path for the project, taking into account any custom packageRoot settings
|
|
17
|
+
let packageRoot = projectNameToPackageRootMap.get(projectNode.name);
|
|
18
|
+
// packageRoot wasn't added to the map yet, try to resolve it dynamically
|
|
19
|
+
if (!packageRoot && includeAll) {
|
|
20
|
+
packageRoot = resolvePackageRoot(projectNode);
|
|
21
|
+
if (!packageRoot) {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
// Append it to the map for later use within the release version generator
|
|
25
|
+
projectNameToPackageRootMap.set(projectNode.name, packageRoot);
|
|
26
|
+
}
|
|
27
|
+
const packageJsonPath = (0, devkit_1.joinPathFragments)(packageRoot, 'package.json');
|
|
28
|
+
if (!tree.exists(packageJsonPath)) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const packageJson = (0, devkit_1.readJson)(tree, packageJsonPath);
|
|
32
|
+
const pkg = new package_1.Package(packageJson, devkit_1.workspaceRoot, packageRoot);
|
|
33
|
+
projectNodeToPackageMap.set(projectNode, pkg);
|
|
34
|
+
}
|
|
35
|
+
// populate local npm package dependencies
|
|
36
|
+
for (const projectDeps of Object.values(projectGraph.dependencies)) {
|
|
37
|
+
const workspaceDeps = projectDeps.filter((dep) => !isExternalNpmDependency(dep.target) &&
|
|
38
|
+
!isExternalNpmDependency(dep.source));
|
|
39
|
+
for (const dep of workspaceDeps) {
|
|
40
|
+
const source = projectGraph.nodes[dep.source];
|
|
41
|
+
const target = projectGraph.nodes[dep.target];
|
|
42
|
+
if (!source ||
|
|
43
|
+
!projectNodeToPackageMap.has(source) ||
|
|
44
|
+
!target ||
|
|
45
|
+
!projectNodeToPackageMap.has(target)) {
|
|
46
|
+
// only relevant for dependencies between two workspace projects with Package objects
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const sourcePackage = projectNodeToPackageMap.get(source);
|
|
50
|
+
const targetPackage = projectNodeToPackageMap.get(target);
|
|
51
|
+
const sourceNpmDependency = sourcePackage.getLocalDependency(targetPackage.name);
|
|
52
|
+
if (!sourceNpmDependency) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const targetVersionSpec = (0, resolve_version_spec_1.resolveVersionSpec)(targetPackage.name, targetPackage.version, sourceNpmDependency.spec, sourcePackage.location);
|
|
56
|
+
const targetMatchesRequirement =
|
|
57
|
+
// For file: and workspace: protocols the targetVersionSpec could be a path, so we check if it matches the target's location
|
|
58
|
+
targetVersionSpec === targetPackage.location ||
|
|
59
|
+
(0, semver_1.satisfies)(targetPackage.version, targetVersionSpec);
|
|
60
|
+
if (targetMatchesRequirement) {
|
|
61
|
+
// track only local package dependencies that are satisfied by the target's version
|
|
62
|
+
localPackageDependencies[dep.source] = [
|
|
63
|
+
...(localPackageDependencies[dep.source] || []),
|
|
64
|
+
{
|
|
65
|
+
...dep,
|
|
66
|
+
dependencyCollection: sourceNpmDependency.collection,
|
|
67
|
+
rawVersionSpec: sourceNpmDependency.spec,
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return localPackageDependencies;
|
|
74
|
+
}
|
|
75
|
+
exports.resolveLocalPackageDependencies = resolveLocalPackageDependencies;
|
|
76
|
+
function isExternalNpmDependency(dep) {
|
|
77
|
+
return dep.startsWith('npm:');
|
|
78
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveVersionSpec(name: string, version: string, spec: string, location?: string): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveVersionSpec = void 0;
|
|
4
|
+
const npa = require("npm-package-arg");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
function resolveVersionSpec(name, version, spec, location) {
|
|
7
|
+
// yarn classic uses link instead of file, normalize to match what npm expects
|
|
8
|
+
spec = spec.replace(/^link:/, 'file:');
|
|
9
|
+
// Support workspace: protocol for pnpm and yarn 2+ (https://pnpm.io/workspaces#workspace-protocol-workspace)
|
|
10
|
+
const isWorkspaceSpec = /^workspace:/.test(spec);
|
|
11
|
+
if (isWorkspaceSpec) {
|
|
12
|
+
spec = spec.replace(/^workspace:/, '');
|
|
13
|
+
// replace aliases (https://pnpm.io/workspaces#referencing-workspace-packages-through-aliases)
|
|
14
|
+
if (spec === '*' || spec === '^' || spec === '~') {
|
|
15
|
+
if (version) {
|
|
16
|
+
const prefix = spec === '*' ? '' : spec;
|
|
17
|
+
spec = `${prefix}${version}`;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
spec = '*';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const npaResult = npa.resolve(name, spec, location);
|
|
25
|
+
return npaResult.fetchSpec.includes('\\')
|
|
26
|
+
? (0, devkit_1.normalizePath)(npaResult.fetchSpec)
|
|
27
|
+
: npaResult.fetchSpec;
|
|
28
|
+
}
|
|
29
|
+
exports.resolveVersionSpec = resolveVersionSpec;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateLockFile = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const child_process_1 = require("child_process");
|
|
6
|
+
const client_1 = require("nx/src/daemon/client/client");
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
|
8
|
+
const lock_file_1 = require("nx/src/plugins/js/lock-file/lock-file");
|
|
9
|
+
const semver_1 = require("semver");
|
|
10
|
+
async function updateLockFile(cwd, { dryRun, verbose, generatorOptions, }) {
|
|
11
|
+
if (generatorOptions?.skipLockFileUpdate) {
|
|
12
|
+
if (verbose) {
|
|
13
|
+
console.log('\nSkipped lock file update because skipLockFileUpdate was set.');
|
|
14
|
+
}
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
const packageManager = (0, devkit_1.detectPackageManager)(cwd);
|
|
18
|
+
if (packageManager === 'yarn' &&
|
|
19
|
+
!(0, semver_1.gte)((0, devkit_1.getPackageManagerVersion)(packageManager), '2.0.0')) {
|
|
20
|
+
// yarn classic does not store workspace data in the lock file, so we don't need to update it
|
|
21
|
+
if (verbose) {
|
|
22
|
+
console.log('\nSkipped lock file update because it is not necessary for Yarn Classic.');
|
|
23
|
+
}
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
const workspacesEnabled = (0, devkit_1.isWorkspacesEnabled)(packageManager, cwd);
|
|
27
|
+
if (!workspacesEnabled) {
|
|
28
|
+
if (verbose) {
|
|
29
|
+
console.log(`\nSkipped lock file update because ${packageManager} workspaces are not enabled.`);
|
|
30
|
+
}
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
const isDaemonEnabled = client_1.daemonClient.enabled();
|
|
34
|
+
if (!dryRun && isDaemonEnabled) {
|
|
35
|
+
// if not in dry-run temporarily stop the daemon, as it will error if the lock file is updated
|
|
36
|
+
await client_1.daemonClient.stop();
|
|
37
|
+
}
|
|
38
|
+
const packageManagerCommands = (0, devkit_1.getPackageManagerCommand)(packageManager);
|
|
39
|
+
let installArgs = generatorOptions?.installArgs || '';
|
|
40
|
+
devkit_1.output.logSingleLine(`Updating ${packageManager} lock file`);
|
|
41
|
+
let env = {};
|
|
42
|
+
if (generatorOptions?.installIgnoreScripts) {
|
|
43
|
+
if (packageManager === 'yarn') {
|
|
44
|
+
env = { YARN_ENABLE_SCRIPTS: 'false' };
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
// npm and pnpm use the same --ignore-scripts option
|
|
48
|
+
installArgs = `${installArgs} --ignore-scripts`.trim();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const lockFile = (0, lock_file_1.getLockFileName)(packageManager);
|
|
52
|
+
const command = `${packageManagerCommands.updateLockFile} ${installArgs}`.trim();
|
|
53
|
+
if (verbose) {
|
|
54
|
+
if (dryRun) {
|
|
55
|
+
console.log(`Would update ${lockFile} with the following command, but --dry-run was set:`);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
console.log(`Updating ${lockFile} with the following command:`);
|
|
59
|
+
}
|
|
60
|
+
console.log(command);
|
|
61
|
+
}
|
|
62
|
+
if (dryRun) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
execLockFileUpdate(command, cwd, env);
|
|
66
|
+
if (isDaemonEnabled) {
|
|
67
|
+
try {
|
|
68
|
+
await client_1.daemonClient.startInBackground();
|
|
69
|
+
}
|
|
70
|
+
catch (e) {
|
|
71
|
+
// If the daemon fails to start, we don't want to prevent the user from continuing, so we just log the error and move on
|
|
72
|
+
if (verbose) {
|
|
73
|
+
devkit_1.output.warn({
|
|
74
|
+
title: 'Unable to restart the Nx Daemon. It will be disabled until you run "nx reset"',
|
|
75
|
+
bodyLines: [e.message],
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return [lockFile];
|
|
81
|
+
}
|
|
82
|
+
exports.updateLockFile = updateLockFile;
|
|
83
|
+
function execLockFileUpdate(command, cwd, env = {}) {
|
|
84
|
+
try {
|
|
85
|
+
(0, child_process_1.execSync)(command, {
|
|
86
|
+
cwd,
|
|
87
|
+
env: {
|
|
88
|
+
...process.env,
|
|
89
|
+
...env,
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
catch (e) {
|
|
94
|
+
devkit_1.output.error({
|
|
95
|
+
title: `Error updating lock file with command '${command}'`,
|
|
96
|
+
bodyLines: [
|
|
97
|
+
`Verify that '${command}' succeeds when run from the workspace root.`,
|
|
98
|
+
`To configure a string of arguments to be passed to this command, set the 'release.version.generatorOptions.installArgs' property in nx.json.`,
|
|
99
|
+
`To ignore install lifecycle scripts, set 'release.version.generatorOptions.installIgnoreScripts' to true in nx.json.`,
|
|
100
|
+
`To disable this step entirely, set 'release.version.skipLockFileUpdate' to true in nx.json.`,
|
|
101
|
+
],
|
|
102
|
+
});
|
|
103
|
+
throw e;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type GeneratorCallback, type Tree } from '@nx/devkit';
|
|
2
|
+
import { SetupBuildGeneratorSchema } from './schema';
|
|
3
|
+
export declare function setupBuildGenerator(tree: Tree, options: SetupBuildGeneratorSchema): Promise<GeneratorCallback>;
|
|
4
|
+
export default setupBuildGenerator;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupBuildGenerator = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const add_swc_config_1 = require("../../utils/swc/add-swc-config");
|
|
6
|
+
const add_swc_dependencies_1 = require("../../utils/swc/add-swc-dependencies");
|
|
7
|
+
const versions_1 = require("../../utils/versions");
|
|
8
|
+
const add_build_target_defaults_1 = require("@nx/devkit/src/generators/add-build-target-defaults");
|
|
9
|
+
async function setupBuildGenerator(tree, options) {
|
|
10
|
+
const tasks = [];
|
|
11
|
+
const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
12
|
+
const buildTarget = options.buildTarget ?? 'build';
|
|
13
|
+
const prevBuildOptions = project.targets?.[buildTarget]?.options;
|
|
14
|
+
project.targets ??= {};
|
|
15
|
+
let mainFile;
|
|
16
|
+
if (prevBuildOptions?.main) {
|
|
17
|
+
mainFile = prevBuildOptions.main;
|
|
18
|
+
}
|
|
19
|
+
else if (options.main) {
|
|
20
|
+
mainFile = options.main;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
const root = project.sourceRoot ?? project.root;
|
|
24
|
+
for (const f of [
|
|
25
|
+
(0, devkit_1.joinPathFragments)(root, 'main.ts'),
|
|
26
|
+
(0, devkit_1.joinPathFragments)(root, 'main.js'),
|
|
27
|
+
(0, devkit_1.joinPathFragments)(root, 'index.ts'),
|
|
28
|
+
(0, devkit_1.joinPathFragments)(root, 'index.js'),
|
|
29
|
+
]) {
|
|
30
|
+
if (tree.exists(f)) {
|
|
31
|
+
mainFile = f;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (!mainFile || !tree.exists(mainFile)) {
|
|
37
|
+
throw new Error(`Cannot locate a main file for ${options.project}. Please specify one using --main=<file-path>.`);
|
|
38
|
+
}
|
|
39
|
+
let tsConfigFile;
|
|
40
|
+
if (prevBuildOptions?.tsConfig) {
|
|
41
|
+
tsConfigFile = prevBuildOptions.tsConfig;
|
|
42
|
+
}
|
|
43
|
+
else if (options.tsConfig) {
|
|
44
|
+
tsConfigFile = options.tsConfig;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
for (const f of [
|
|
48
|
+
'tsconfig.lib.json',
|
|
49
|
+
'tsconfig.app.json',
|
|
50
|
+
'tsconfig.json',
|
|
51
|
+
]) {
|
|
52
|
+
const candidate = (0, devkit_1.joinPathFragments)(project.root, f);
|
|
53
|
+
if (tree.exists(candidate)) {
|
|
54
|
+
tsConfigFile = candidate;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (!tsConfigFile || !tree.exists(tsConfigFile)) {
|
|
60
|
+
throw new Error(`Cannot locate a tsConfig file for ${options.project}. Please specify one using --tsConfig=<file-path>.`);
|
|
61
|
+
}
|
|
62
|
+
switch (options.bundler) {
|
|
63
|
+
case 'vite': {
|
|
64
|
+
const { viteConfigurationGenerator } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
|
|
65
|
+
const task = await viteConfigurationGenerator(tree, {
|
|
66
|
+
buildTarget: options.buildTarget,
|
|
67
|
+
project: options.project,
|
|
68
|
+
newProject: true,
|
|
69
|
+
uiFramework: 'none',
|
|
70
|
+
includeVitest: false,
|
|
71
|
+
includeLib: true,
|
|
72
|
+
skipFormat: true,
|
|
73
|
+
});
|
|
74
|
+
tasks.push(task);
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
case 'esbuild': {
|
|
78
|
+
const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/esbuild', versions_1.nxVersion);
|
|
79
|
+
const task = await configurationGenerator(tree, {
|
|
80
|
+
main: mainFile,
|
|
81
|
+
buildTarget: options.buildTarget,
|
|
82
|
+
project: options.project,
|
|
83
|
+
skipFormat: true,
|
|
84
|
+
skipValidation: true,
|
|
85
|
+
});
|
|
86
|
+
tasks.push(task);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
case 'rollup': {
|
|
90
|
+
const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/rollup', versions_1.nxVersion);
|
|
91
|
+
const task = await configurationGenerator(tree, {
|
|
92
|
+
buildTarget: options.buildTarget,
|
|
93
|
+
main: mainFile,
|
|
94
|
+
tsConfig: tsConfigFile,
|
|
95
|
+
project: options.project,
|
|
96
|
+
compiler: 'tsc',
|
|
97
|
+
format: ['cjs', 'esm'],
|
|
98
|
+
skipFormat: true,
|
|
99
|
+
skipValidation: true,
|
|
100
|
+
});
|
|
101
|
+
tasks.push(task);
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
case 'tsc': {
|
|
105
|
+
(0, add_build_target_defaults_1.addBuildTargetDefaults)(tree, '@nx/js:tsc');
|
|
106
|
+
const outputPath = (0, devkit_1.joinPathFragments)('dist', project.root);
|
|
107
|
+
project.targets[buildTarget] = {
|
|
108
|
+
executor: `@nx/js:tsc`,
|
|
109
|
+
outputs: ['{options.outputPath}'],
|
|
110
|
+
options: {
|
|
111
|
+
outputPath,
|
|
112
|
+
main: mainFile,
|
|
113
|
+
tsConfig: tsConfigFile,
|
|
114
|
+
assets: [],
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
(0, devkit_1.updateProjectConfiguration)(tree, options.project, project);
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
case 'swc': {
|
|
121
|
+
(0, add_build_target_defaults_1.addBuildTargetDefaults)(tree, '@nx/js:swc');
|
|
122
|
+
const outputPath = (0, devkit_1.joinPathFragments)('dist', project.root);
|
|
123
|
+
project.targets[buildTarget] = {
|
|
124
|
+
executor: `@nx/js:swc`,
|
|
125
|
+
outputs: ['{options.outputPath}'],
|
|
126
|
+
options: {
|
|
127
|
+
outputPath,
|
|
128
|
+
main: mainFile,
|
|
129
|
+
tsConfig: tsConfigFile,
|
|
130
|
+
assets: [],
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
(0, devkit_1.updateProjectConfiguration)(tree, options.project, project);
|
|
134
|
+
(0, add_swc_dependencies_1.addSwcDependencies)(tree);
|
|
135
|
+
(0, add_swc_config_1.addSwcConfig)(tree, project.root, 'es6');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
139
|
+
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
140
|
+
}
|
|
141
|
+
exports.setupBuildGenerator = setupBuildGenerator;
|
|
142
|
+
exports.default = setupBuildGenerator;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "SetupBuild",
|
|
4
|
+
"title": "Setup Build",
|
|
5
|
+
"description": "Sets up build target for a project.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"project": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Project to add the build target to.",
|
|
11
|
+
"$default": {
|
|
12
|
+
"$source": "argv",
|
|
13
|
+
"index": 0
|
|
14
|
+
},
|
|
15
|
+
"x-prompt": "Which project do you want to add build to?",
|
|
16
|
+
"x-dropdown": "projects",
|
|
17
|
+
"x-priority": "important"
|
|
18
|
+
},
|
|
19
|
+
"bundler": {
|
|
20
|
+
"description": "The bundler to use to build the project.",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["tsc", "swc", "rollup", "vite", "esbuild"],
|
|
23
|
+
"default": "tsc",
|
|
24
|
+
"x-prompt": "Which bundler would you like to use to build the project?",
|
|
25
|
+
"x-priority": "important"
|
|
26
|
+
},
|
|
27
|
+
"main": {
|
|
28
|
+
"description": "The path to the main entry file, relative to workspace root. Defaults to <project>/src/index.ts or <project>/src/main.ts.",
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"tsConfig": {
|
|
32
|
+
"description": "The path to the tsConfig file, relative to workspace root. Defaults to <project>/tsconfig.lib.json or <project>/tsconfig.app.json depending on project type.",
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"buildTarget": {
|
|
36
|
+
"description": "The build target to add.",
|
|
37
|
+
"type": "string",
|
|
38
|
+
"default": "build"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": ["project", "bundler"]
|
|
42
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# path to a directory with all packages
|
|
2
|
+
storage: ../tmp/local-registry/storage
|
|
3
|
+
|
|
4
|
+
# a list of other known repositories we can talk to
|
|
5
|
+
uplinks:
|
|
6
|
+
npmjs:
|
|
7
|
+
url: <%= npmUplinkRegistry %>
|
|
8
|
+
maxage: 60m
|
|
9
|
+
|
|
10
|
+
packages:
|
|
11
|
+
'**':
|
|
12
|
+
# give all users (including non-authenticated users) full access
|
|
13
|
+
# because it is a local registry
|
|
14
|
+
access: $all
|
|
15
|
+
publish: $all
|
|
16
|
+
unpublish: $all
|
|
17
|
+
|
|
18
|
+
# if package is not available locally, proxy requests to npm registry
|
|
19
|
+
proxy: npmjs
|
|
20
|
+
|
|
21
|
+
# log settings
|
|
22
|
+
logs:
|
|
23
|
+
type: stdout
|
|
24
|
+
format: pretty
|
|
25
|
+
level: warn
|
|
26
|
+
|
|
27
|
+
publish:
|
|
28
|
+
allow_offline: true # set offline to true to allow publish offline
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupVerdaccio = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const versions_1 = require("../../utils/versions");
|
|
7
|
+
const child_process_1 = require("child_process");
|
|
8
|
+
async function setupVerdaccio(tree, options) {
|
|
9
|
+
if (!tree.exists('.verdaccio/config.yml')) {
|
|
10
|
+
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), '.verdaccio', {
|
|
11
|
+
npmUplinkRegistry: (0, child_process_1.execSync)('npm config get registry')?.toString()?.trim() ??
|
|
12
|
+
'https://registry.npmjs.org',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
const verdaccioTarget = {
|
|
16
|
+
executor: '@nx/js:verdaccio',
|
|
17
|
+
options: {
|
|
18
|
+
port: 4873,
|
|
19
|
+
config: '.verdaccio/config.yml',
|
|
20
|
+
storage: 'tmp/local-registry/storage',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
if (!tree.exists('project.json')) {
|
|
24
|
+
const { name } = (0, devkit_1.readJson)(tree, 'package.json');
|
|
25
|
+
(0, devkit_1.updateJson)(tree, 'package.json', (json) => {
|
|
26
|
+
if (!json.nx) {
|
|
27
|
+
json.nx = {
|
|
28
|
+
includedScripts: [],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return json;
|
|
32
|
+
});
|
|
33
|
+
(0, devkit_1.addProjectConfiguration)(tree, name, {
|
|
34
|
+
root: '.',
|
|
35
|
+
targets: {
|
|
36
|
+
['local-registry']: verdaccioTarget,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
// use updateJson instead of updateProjectConfiguration due to unknown project name
|
|
42
|
+
(0, devkit_1.updateJson)(tree, 'project.json', (json) => {
|
|
43
|
+
if (!json.targets) {
|
|
44
|
+
json.targets = {};
|
|
45
|
+
}
|
|
46
|
+
json.targets['local-registry'] ??= verdaccioTarget;
|
|
47
|
+
return json;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (!options.skipFormat) {
|
|
51
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
52
|
+
}
|
|
53
|
+
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { verdaccio: versions_1.verdaccioVersion });
|
|
54
|
+
}
|
|
55
|
+
exports.setupVerdaccio = setupVerdaccio;
|
|
56
|
+
exports.default = setupVerdaccio;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "SetupVerdaccio",
|
|
4
|
+
"title": "Setup Verdaccio",
|
|
5
|
+
"description": "Setup Verdaccio local-registry.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"skipFormat": {
|
|
9
|
+
"description": "Skip formatting files.",
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"default": false,
|
|
12
|
+
"x-priority": "internal"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": []
|
|
16
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './utils/typescript/add-tslib-dependencies';
|
|
2
|
+
export * from './utils/typescript/load-ts-transformers';
|
|
3
|
+
export * from './utils/typescript/print-diagnostics';
|
|
4
|
+
export * from './utils/typescript/run-type-check';
|
|
5
|
+
export * from './utils/typescript/get-source-nodes';
|
|
6
|
+
export * from './utils/compiler-helper-dependency';
|
|
7
|
+
export * from './utils/typescript/ts-config';
|
|
8
|
+
export * from './utils/typescript/create-ts-config';
|
|
9
|
+
export * from './utils/typescript/ast-utils';
|
|
10
|
+
export * from './utils/package-json';
|
|
11
|
+
export * from './utils/assets';
|
|
12
|
+
export * from './utils/package-json/update-package-json';
|
|
13
|
+
export * from './utils/package-json/create-entry-points';
|
|
14
|
+
export { libraryGenerator } from './generators/library/library';
|
|
15
|
+
export { initGenerator } from './generators/init/init';
|
|
16
|
+
export { createLockFile, getLockFileName, } from 'nx/src/plugins/js/lock-file/lock-file';
|
|
17
|
+
export { createPackageJson } from 'nx/src/plugins/js/package-json/create-package-json';
|