@aws/create-nx-workspace 0.96.0 → 0.97.1
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/bin/index.cjs +0 -1
- package/package.json +2 -2
- package/bin/index.d.ts +0 -2
- package/bin/index.js +0 -11
- package/bin/index.js.map +0 -1
- package/src/create-nx-workspace.d.ts +0 -10
- package/src/create-nx-workspace.js +0 -43
- package/src/create-nx-workspace.js.map +0 -1
- package/src/index.d.ts +0 -5
- package/src/index.js +0 -11
- package/src/index.js.map +0 -1
package/bin/index.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/create-nx-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.97.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/awslabs/nx-plugin-for-aws.git",
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
"bin": {
|
|
16
16
|
"create-nx-workspace": "bin/index.cjs"
|
|
17
17
|
}
|
|
18
|
-
}
|
|
18
|
+
}
|
package/bin/index.d.ts
DELETED
package/bin/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
-
*/
|
|
8
|
-
const create_nx_workspace_1 = require("../src/create-nx-workspace");
|
|
9
|
-
const args = process.argv.slice(2);
|
|
10
|
-
process.exit((0, create_nx_workspace_1.createNxWorkspace)(args));
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
package/bin/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/create-nx-workspace/bin/index.ts"],"names":[],"mappings":";;;AACA;;;GAGG;AACH,oEAA+D;AAE/D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,OAAO,CAAC,IAAI,CAAC,IAAA,uCAAiB,EAAC,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build the argument list for create-nx-workspace.
|
|
3
|
-
* Positional args come first, then --preset and defaults, then user flags.
|
|
4
|
-
*/
|
|
5
|
-
export declare const buildArgs: (args: string[]) => string[];
|
|
6
|
-
/**
|
|
7
|
-
* Create a new Nx workspace with the @aws/nx-plugin preset.
|
|
8
|
-
* All arguments are forwarded to create-nx-workspace.
|
|
9
|
-
*/
|
|
10
|
-
export declare const createNxWorkspace: (args: string[]) => number;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNxWorkspace = exports.buildArgs = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
-
*/
|
|
8
|
-
const child_process_1 = require("child_process");
|
|
9
|
-
const PRESET = '@aws/nx-plugin';
|
|
10
|
-
const DEFAULT_FLAGS = ['--ci=skip', '--analytics=false'];
|
|
11
|
-
/**
|
|
12
|
-
* Build the argument list for create-nx-workspace.
|
|
13
|
-
* Positional args come first, then --preset and defaults, then user flags.
|
|
14
|
-
*/
|
|
15
|
-
const buildArgs = (args) => {
|
|
16
|
-
const positionalArgs = args.filter((a) => !a.startsWith('-'));
|
|
17
|
-
const flagArgs = args.filter((a) => a.startsWith('-'));
|
|
18
|
-
const flagsToAdd = DEFAULT_FLAGS.filter((flag) => !flagArgs.some((a) => a.startsWith(flag.split('=')[0])));
|
|
19
|
-
return [...positionalArgs, `--preset=${PRESET}`, ...flagsToAdd, ...flagArgs];
|
|
20
|
-
};
|
|
21
|
-
exports.buildArgs = buildArgs;
|
|
22
|
-
/**
|
|
23
|
-
* Create a new Nx workspace with the @aws/nx-plugin preset.
|
|
24
|
-
* All arguments are forwarded to create-nx-workspace.
|
|
25
|
-
*/
|
|
26
|
-
const createNxWorkspace = (args) => {
|
|
27
|
-
const hasPreset = args.some((a) => a.startsWith('--preset'));
|
|
28
|
-
if (hasPreset) {
|
|
29
|
-
console.error(`Error: --preset cannot be used with @aws/create-nx-workspace.\n` +
|
|
30
|
-
`This package always creates a workspace with the ${PRESET} preset.\n` +
|
|
31
|
-
`To use a different preset, run create-nx-workspace directly:\n\n` +
|
|
32
|
-
` npx create-nx-workspace <name> --preset=<your-preset>\n`);
|
|
33
|
-
return 1;
|
|
34
|
-
}
|
|
35
|
-
const allArgs = (0, exports.buildArgs)(args);
|
|
36
|
-
const cnwBin = require.resolve('create-nx-workspace/bin/index.js');
|
|
37
|
-
const result = (0, child_process_1.spawnSync)(process.execPath, [cnwBin, ...allArgs], {
|
|
38
|
-
stdio: 'inherit',
|
|
39
|
-
});
|
|
40
|
-
return result.status ?? 1;
|
|
41
|
-
};
|
|
42
|
-
exports.createNxWorkspace = createNxWorkspace;
|
|
43
|
-
//# sourceMappingURL=create-nx-workspace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-nx-workspace.js","sourceRoot":"","sources":["../../../../packages/create-nx-workspace/src/create-nx-workspace.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,iDAA0C;AAE1C,MAAM,MAAM,GAAG,gBAAgB,CAAC;AAChC,MAAM,aAAa,GAAG,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;AAEzD;;;GAGG;AACI,MAAM,SAAS,GAAG,CAAC,IAAc,EAAY,EAAE;IACpD,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,E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H,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC;AApBW,QAAA,iBAAiB,qBAoB5B"}
|
package/src/index.d.ts
DELETED
package/src/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildArgs = exports.createNxWorkspace = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
-
*/
|
|
8
|
-
var create_nx_workspace_1 = require("./create-nx-workspace");
|
|
9
|
-
Object.defineProperty(exports, "createNxWorkspace", { enumerable: true, get: function () { return create_nx_workspace_1.createNxWorkspace; } });
|
|
10
|
-
Object.defineProperty(exports, "buildArgs", { enumerable: true, get: function () { return create_nx_workspace_1.buildArgs; } });
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/create-nx-workspace/src/index.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,6DAAqE;AAA5D,wHAAA,iBAAiB,OAAA;AAAE,gHAAA,SAAS,OAAA"}
|