@aws/nx-plugin 0.95.1 → 0.97.0
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-THIRD-PARTY +97 -56
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/mcp-server/generator-info.d.ts +1 -1
- package/src/mcp-server/generator-info.js +1 -1
- package/src/mcp-server/generator-info.js.map +1 -1
- package/src/mcp-server/tools/create-workspace-command.js +5 -5
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
- package/src/mcp-server/tools/general-guidance.d.ts +1 -1
- package/src/mcp-server/tools/general-guidance.js +2 -2
- package/src/mcp-server/tools/general-guidance.js.map +1 -1
- package/src/mcp-server/tools/generator-guide.d.ts +1 -1
- package/src/mcp-server/tools/list-generators.d.ts +1 -1
- package/src/terraform/project/generator.js +3 -0
- package/src/terraform/project/generator.js.map +1 -1
- package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +17 -3
- package/src/ts/nx-plugin/files/mcp-server/tools/create-workspace-command.ts.template +2 -2
- package/src/ts/nx-plugin/files/mcp-server/utils.ts.template +11 -1
- package/src/ts/nx-plugin/generator.js +0 -2
- package/src/ts/nx-plugin/generator.js.map +1 -1
- package/src/utils/commands.d.ts +17 -3
- package/src/utils/commands.js +26 -12
- package/src/utils/commands.js.map +1 -1
- package/src/utils/generators.d.ts +4 -0
- package/src/utils/generators.js.map +1 -1
- package/src/utils/iac-providers.d.ts +7 -0
- package/src/utils/iac-providers.js +9 -0
- package/src/utils/iac-providers.js.map +1 -0
- package/src/utils/iac.d.ts +4 -5
- package/src/utils/iac.js +5 -3
- package/src/utils/iac.js.map +1 -1
- package/src/utils/nx.d.ts +9 -5
- package/src/utils/nx.js +4 -4
- package/src/utils/nx.js.map +1 -1
package/LICENSE-THIRD-PARTY
CHANGED
|
@@ -3244,7 +3244,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
3244
3244
|
|
|
3245
3245
|
---
|
|
3246
3246
|
|
|
3247
|
-
The following software may be included in this product: @emnapi/core (1.9.
|
|
3247
|
+
The following software may be included in this product: @emnapi/core (1.9.2)
|
|
3248
3248
|
This software contains the following license and notice below:
|
|
3249
3249
|
|
|
3250
3250
|
MIT License
|
|
@@ -3271,7 +3271,7 @@ SOFTWARE.
|
|
|
3271
3271
|
|
|
3272
3272
|
---
|
|
3273
3273
|
|
|
3274
|
-
The following software may be included in this product: @emnapi/runtime (1.
|
|
3274
|
+
The following software may be included in this product: @emnapi/runtime (1.9.2)
|
|
3275
3275
|
This software contains the following license and notice below:
|
|
3276
3276
|
|
|
3277
3277
|
MIT License
|
|
@@ -3298,7 +3298,7 @@ SOFTWARE.
|
|
|
3298
3298
|
|
|
3299
3299
|
---
|
|
3300
3300
|
|
|
3301
|
-
The following software may be included in this product: @emnapi/wasi-threads (1.2.
|
|
3301
|
+
The following software may be included in this product: @emnapi/wasi-threads (1.2.1)
|
|
3302
3302
|
This software contains the following license and notice below:
|
|
3303
3303
|
|
|
3304
3304
|
MIT License
|
|
@@ -3325,12 +3325,12 @@ SOFTWARE.
|
|
|
3325
3325
|
|
|
3326
3326
|
---
|
|
3327
3327
|
|
|
3328
|
-
The following software may be included in this product: @esbuild/
|
|
3328
|
+
The following software may be included in this product: @esbuild/darwin-arm64 (0.27.4)
|
|
3329
3329
|
This software contains the following license and notice below:
|
|
3330
3330
|
|
|
3331
3331
|
MIT License
|
|
3332
3332
|
|
|
3333
|
-
Copyright (c) The maintainers of @esbuild/
|
|
3333
|
+
Copyright (c) The maintainers of @esbuild/darwin-arm64 <https://github.com/evanw/esbuild#readme>
|
|
3334
3334
|
|
|
3335
3335
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
3336
3336
|
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
@@ -3349,12 +3349,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
3349
3349
|
|
|
3350
3350
|
---
|
|
3351
3351
|
|
|
3352
|
-
The following software may be included in this product: @esbuild/
|
|
3352
|
+
The following software may be included in this product: @esbuild/darwin-arm64 (0.28.0)
|
|
3353
3353
|
This software contains the following license and notice below:
|
|
3354
3354
|
|
|
3355
3355
|
MIT License
|
|
3356
3356
|
|
|
3357
|
-
Copyright (c) The maintainers of @esbuild/
|
|
3357
|
+
Copyright (c) The maintainers of @esbuild/darwin-arm64 <https://github.com/evanw/esbuild#readme>
|
|
3358
3358
|
|
|
3359
3359
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
3360
3360
|
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
@@ -3528,12 +3528,36 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
3528
3528
|
|
|
3529
3529
|
---
|
|
3530
3530
|
|
|
3531
|
-
The following software may be included in this product: @getgrit/gritql-
|
|
3531
|
+
The following software may be included in this product: @getgrit/gritql-darwin-arm64 (0.0.3)
|
|
3532
3532
|
This software contains the following license and notice below:
|
|
3533
3533
|
|
|
3534
3534
|
MIT License
|
|
3535
3535
|
|
|
3536
|
-
Copyright (c) The maintainers of @getgrit/gritql-
|
|
3536
|
+
Copyright (c) The maintainers of @getgrit/gritql-darwin-arm64 <https://github.com/biomejs/gritql#readme>
|
|
3537
|
+
|
|
3538
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
3539
|
+
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
3540
|
+
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
3541
|
+
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
|
3542
|
+
following conditions:
|
|
3543
|
+
|
|
3544
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
3545
|
+
portions of the Software.
|
|
3546
|
+
|
|
3547
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
3548
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
3549
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
3550
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
3551
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
3552
|
+
|
|
3553
|
+
---
|
|
3554
|
+
|
|
3555
|
+
The following software may be included in this product: @getgrit/gritql-darwin-universal (0.0.3)
|
|
3556
|
+
This software contains the following license and notice below:
|
|
3557
|
+
|
|
3558
|
+
MIT License
|
|
3559
|
+
|
|
3560
|
+
Copyright (c) The maintainers of @getgrit/gritql-darwin-universal <https://github.com/biomejs/gritql#readme>
|
|
3537
3561
|
|
|
3538
3562
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
3539
3563
|
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
@@ -5053,7 +5077,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
5053
5077
|
|
|
5054
5078
|
---
|
|
5055
5079
|
|
|
5056
|
-
The following software may be included in this product: @nx/nx-
|
|
5080
|
+
The following software may be included in this product: @nx/nx-darwin-arm64 (22.6.5)
|
|
5057
5081
|
This software contains the following license and notice below:
|
|
5058
5082
|
|
|
5059
5083
|
(The MIT License)
|
|
@@ -5304,12 +5328,12 @@ SOFTWARE.
|
|
|
5304
5328
|
|
|
5305
5329
|
---
|
|
5306
5330
|
|
|
5307
|
-
The following software may be included in this product: @oxc-resolver/binding-
|
|
5331
|
+
The following software may be included in this product: @oxc-resolver/binding-darwin-arm64 (11.19.1)
|
|
5308
5332
|
This software contains the following license and notice below:
|
|
5309
5333
|
|
|
5310
5334
|
MIT License
|
|
5311
5335
|
|
|
5312
|
-
Copyright (c) The maintainers of @oxc-resolver/binding-
|
|
5336
|
+
Copyright (c) The maintainers of @oxc-resolver/binding-darwin-arm64 <https://oxc.rs>
|
|
5313
5337
|
|
|
5314
5338
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
5315
5339
|
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
@@ -5640,12 +5664,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
5640
5664
|
|
|
5641
5665
|
---
|
|
5642
5666
|
|
|
5643
|
-
The following software may be included in this product: @rolldown/binding-
|
|
5667
|
+
The following software may be included in this product: @rolldown/binding-darwin-arm64 (1.0.0-rc.15)
|
|
5644
5668
|
This software contains the following license and notice below:
|
|
5645
5669
|
|
|
5646
5670
|
MIT License
|
|
5647
5671
|
|
|
5648
|
-
Copyright (c) The maintainers of @rolldown/binding-
|
|
5672
|
+
Copyright (c) The maintainers of @rolldown/binding-darwin-arm64 <https://rolldown.rs/>
|
|
5649
5673
|
|
|
5650
5674
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
5651
5675
|
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
@@ -5905,7 +5929,7 @@ THE SOFTWARE.
|
|
|
5905
5929
|
|
|
5906
5930
|
---
|
|
5907
5931
|
|
|
5908
|
-
The following software may be included in this product: @rollup/rollup-
|
|
5932
|
+
The following software may be included in this product: @rollup/rollup-darwin-arm64 (4.50.1)
|
|
5909
5933
|
This software contains the following license and notice below:
|
|
5910
5934
|
|
|
5911
5935
|
MIT License
|
|
@@ -5957,7 +5981,7 @@ SOFTWARE.
|
|
|
5957
5981
|
|
|
5958
5982
|
---
|
|
5959
5983
|
|
|
5960
|
-
The following software may be included in this product: @rspack/binding-
|
|
5984
|
+
The following software may be included in this product: @rspack/binding-darwin-arm64 (1.6.8)
|
|
5961
5985
|
This software contains the following license and notice below:
|
|
5962
5986
|
|
|
5963
5987
|
MIT License
|
|
@@ -8979,19 +9003,6 @@ SOFTWARE.
|
|
|
8979
9003
|
|
|
8980
9004
|
---
|
|
8981
9005
|
|
|
8982
|
-
The following software may be included in this product: axios (1.13.6)
|
|
8983
|
-
This software contains the following license and notice below:
|
|
8984
|
-
|
|
8985
|
-
# Copyright (c) 2014-present Matt Zabriskie & Collaborators
|
|
8986
|
-
|
|
8987
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
8988
|
-
|
|
8989
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8990
|
-
|
|
8991
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
8992
|
-
|
|
8993
|
-
---
|
|
8994
|
-
|
|
8995
9006
|
The following software may be included in this product: axios (1.15.0)
|
|
8996
9007
|
This software contains the following license and notice below:
|
|
8997
9008
|
|
|
@@ -11246,6 +11257,34 @@ OTHER DEALINGS IN THE SOFTWARE.
|
|
|
11246
11257
|
|
|
11247
11258
|
---
|
|
11248
11259
|
|
|
11260
|
+
The following software may be included in this product: create-nx-workspace (22.6.5)
|
|
11261
|
+
This software contains the following license and notice below:
|
|
11262
|
+
|
|
11263
|
+
(The MIT License)
|
|
11264
|
+
|
|
11265
|
+
Copyright (c) 2017-2026 Narwhal Technologies Inc.
|
|
11266
|
+
|
|
11267
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
11268
|
+
a copy of this software and associated documentation files (the
|
|
11269
|
+
'Software'), to deal in the Software without restriction, including
|
|
11270
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
11271
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
11272
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11273
|
+
the following conditions:
|
|
11274
|
+
|
|
11275
|
+
The above copyright notice and this permission notice shall be
|
|
11276
|
+
included in all copies or substantial portions of the Software.
|
|
11277
|
+
|
|
11278
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
11279
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
11280
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
11281
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
11282
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
11283
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
11284
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
11285
|
+
|
|
11286
|
+
---
|
|
11287
|
+
|
|
11249
11288
|
The following software may be included in this product: cron-parser (4.9.0)
|
|
11250
11289
|
This software contains the following license and notice below:
|
|
11251
11290
|
|
|
@@ -14018,6 +14057,34 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE
|
|
|
14018
14057
|
|
|
14019
14058
|
---
|
|
14020
14059
|
|
|
14060
|
+
The following software may be included in this product: fsevents (2.3.3)
|
|
14061
|
+
This software contains the following license and notice below:
|
|
14062
|
+
|
|
14063
|
+
MIT License
|
|
14064
|
+
-----------
|
|
14065
|
+
|
|
14066
|
+
Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller
|
|
14067
|
+
|
|
14068
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14069
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14070
|
+
in the Software without restriction, including without limitation the rights
|
|
14071
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14072
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14073
|
+
furnished to do so, subject to the following conditions:
|
|
14074
|
+
|
|
14075
|
+
The above copyright notice and this permission notice shall be included in
|
|
14076
|
+
all copies or substantial portions of the Software.
|
|
14077
|
+
|
|
14078
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14079
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14080
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
14081
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14082
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
14083
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
14084
|
+
THE SOFTWARE.
|
|
14085
|
+
|
|
14086
|
+
---
|
|
14087
|
+
|
|
14021
14088
|
The following software may be included in this product: function-bind (1.1.2)
|
|
14022
14089
|
This software contains the following license and notice below:
|
|
14023
14090
|
|
|
@@ -20829,32 +20896,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
20829
20896
|
|
|
20830
20897
|
---
|
|
20831
20898
|
|
|
20832
|
-
The following software may be included in this product: proxy-from-env (1.1.0)
|
|
20833
|
-
This software contains the following license and notice below:
|
|
20834
|
-
|
|
20835
|
-
The MIT License
|
|
20836
|
-
|
|
20837
|
-
Copyright (C) 2016-2018 Rob Wu <rob@robwu.nl>
|
|
20838
|
-
|
|
20839
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
20840
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
20841
|
-
the Software without restriction, including without limitation the rights to
|
|
20842
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
20843
|
-
of the Software, and to permit persons to whom the Software is furnished to do
|
|
20844
|
-
so, subject to the following conditions:
|
|
20845
|
-
|
|
20846
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20847
|
-
copies or substantial portions of the Software.
|
|
20848
|
-
|
|
20849
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20850
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
20851
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
20852
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
20853
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20854
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20855
|
-
|
|
20856
|
-
---
|
|
20857
|
-
|
|
20858
20899
|
The following software may be included in this product: proxy-from-env (2.1.0)
|
|
20859
20900
|
This software contains the following license and notice below:
|
|
20860
20901
|
|
|
@@ -41434,7 +41475,7 @@ defined by the Mozilla Public License, v. 2.0.
|
|
|
41434
41475
|
|
|
41435
41476
|
---
|
|
41436
41477
|
|
|
41437
|
-
The following software may be included in this product: lightningcss-
|
|
41478
|
+
The following software may be included in this product: lightningcss-darwin-arm64 (1.32.0)
|
|
41438
41479
|
This software contains the following license and notice below:
|
|
41439
41480
|
|
|
41440
41481
|
Mozilla Public License Version 2.0
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
|
15
15
|
const buildNxCommand = (command, pm) => pm ? (0, commands_1.buildPackageManagerExecCommand)(pm, `nx ${command}`) : `nx ${command}`;
|
|
16
16
|
exports.buildNxCommand = buildNxCommand;
|
|
17
17
|
const renderSchema = (schema) => Object.entries(schema.properties)
|
|
18
|
-
.map(([parameter, parameterSchema]) => `- ${parameter} [type: ${parameterSchema.type}]${(schema.required ?? []).includes(parameter) ? ` (required)` : ''} ${parameterSchema.description}`)
|
|
18
|
+
.map(([parameter, parameterSchema]) => `- ${parameter} [type: ${parameterSchema.type}]${parameterSchema.enum ? ` [options: ${parameterSchema.enum.join(', ')}]` : ''}${(schema.required ?? []).includes(parameter) ? ` (required)` : ''} ${parameterSchema.description}`)
|
|
19
19
|
.join('\n');
|
|
20
20
|
const renderGeneratorCommand = (generatorId, schema, packageManager) => `\`\`\`bash
|
|
21
21
|
${(0, exports.buildNxCommand)(`g @aws/nx-plugin:${generatorId} --no-interactive ${Object.entries(schema.properties)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator-info.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/mcp-server/generator-info.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,0CAA2C;AAC3C,gDAK2B;AAE3B,oDAAoB;AAEpB;;GAEG;AACI,MAAM,cAAc,GAAG,CAAC,OAAe,EAAE,EAAW,EAAE,EAAE,CAC7D,EAAE,CAAC,CAAC,CAAC,IAAA,yCAA8B,EAAC,EAAE,EAAE,MAAM,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,OAAO,EAAE,CAAC;AADhE,QAAA,cAAc,kBACkD;AAE7E,MAAM,YAAY,GAAG,CAAC,MAAW,EAAE,EAAE,CACnC,MAAM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AC,CAAC;AAjLW,QAAA,gBAAgB,oBAiL3B"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addCreateWorkspaceCommandTool = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const schema_1 = require("../schema");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const iac_providers_1 = require("../../utils/iac-providers");
|
|
7
|
+
const commands_1 = require("../../utils/commands");
|
|
8
8
|
/**
|
|
9
9
|
* Add a tool which tells a model how to create an Nx workspace
|
|
10
10
|
*/
|
|
@@ -22,13 +22,13 @@ const addCreateWorkspaceCommandTool = (server) => {
|
|
|
22
22
|
text: `Run the following command to create a workspace:
|
|
23
23
|
|
|
24
24
|
\`\`\`bash
|
|
25
|
-
|
|
25
|
+
${(0, commands_1.buildCreateNxWorkspaceCommand)(packageManager, workspaceName)} --no-interactive
|
|
26
26
|
\`\`\`
|
|
27
27
|
|
|
28
28
|
This will create a new workspace within the ${workspaceName} directory.
|
|
29
29
|
|
|
30
|
-
Note that this will prompt for an Infrastructure as Code provider (${
|
|
31
|
-
If you know the preferred option, pass ${
|
|
30
|
+
Note that this will prompt for an Infrastructure as Code provider (${iac_providers_1.IAC_PROVIDERS.join(', ')}).
|
|
31
|
+
If you know the preferred option, pass ${iac_providers_1.IAC_PROVIDERS.map((iac) => `\`--iacProvider=${iac}\``).join(' or ')} to the above command to skip the prompt.
|
|
32
32
|
`,
|
|
33
33
|
},
|
|
34
34
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-workspace-command.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/create-workspace-command.ts"],"names":[],"mappings":";;;AAKA,6BAAwB;AACxB,sCAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"create-workspace-command.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/create-workspace-command.ts"],"names":[],"mappings":";;;AAKA,6BAAwB;AACxB,sCAAiD;AACjD,6DAA0D;AAC1D,mDAAqE;AAErE;;GAEG;AACI,MAAM,6BAA6B,GAAG,CAAC,MAAiB,EAAE,EAAE;IACjE,MAAM,CAAC,YAAY,CACjB,0BAA0B,EAC1B;QACE,WAAW,EACT,oEAAoE;QACtE,WAAW,EAAE;YACX,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;YACzB,cAAc,EAAE,6BAAoB;SACrC;KACF,EACD,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;QACtC,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE;;;EAGd,IAAA,wCAA6B,EAAC,cAAc,EAAE,aAAa,CAAC;;;8CAGhB,aAAa;;qEAEU,6BAAa,CAAC,IAAI,CAAC,IAAI,CAAC;yCACpD,6BAAa,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;GACzG;aACM;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AA9BW,QAAA,6BAA6B,iCA8BxC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
|
-
import { NxGeneratorInfo } from '../../utils/
|
|
6
|
+
import { NxGeneratorInfo } from '../../utils/generators';
|
|
7
7
|
export declare const TOOL_SELECTION_GUIDE = "## Tool Selection Guide\n\n- Use the `general-guidance` tool for guidance and best practices for working with Nx and the Nx Plugin for AWS.\n- Use the `create-workspace-command` tool to discover how to create a workspace to start a new project.\n- Use the `list-generators` tool to discover the available generators and how to run them.\n- Use the `generator-guide` tool to retrieve detailed information about a specific generator.";
|
|
8
8
|
/**
|
|
9
9
|
* Add a tool which provides general guidance for using Nx and the Nx Plugin for AWS
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addGeneralGuidanceTool = exports.TOOL_SELECTION_GUIDE = void 0;
|
|
4
4
|
const schema_1 = require("../schema");
|
|
5
5
|
const generator_info_1 = require("../generator-info");
|
|
6
|
-
const
|
|
6
|
+
const iac_providers_1 = require("../../utils/iac-providers");
|
|
7
7
|
exports.TOOL_SELECTION_GUIDE = `## Tool Selection Guide
|
|
8
8
|
|
|
9
9
|
- Use the \`general-guidance\` tool for guidance and best practices for working with Nx and the Nx Plugin for AWS.
|
|
@@ -28,7 +28,7 @@ ${exports.TOOL_SELECTION_GUIDE}
|
|
|
28
28
|
## Getting Started
|
|
29
29
|
|
|
30
30
|
- Choose a package manager first. You can choose between ${schema_1.PACKAGE_MANAGERS.join(', ')}. It's recommended to use "pnpm" if the user has no preference
|
|
31
|
-
- Choose an infrastructure as code (IaC) provider next. You can choose between ${
|
|
31
|
+
- Choose an infrastructure as code (IaC) provider next. You can choose between ${iac_providers_1.IAC_PROVIDERS.join(', ')}. It's recommended to use CDK if the user has no preference
|
|
32
32
|
- Next, you must create an Nx workspace. Use the \`create-workspace-command\` tool for more details, and provide it with your chosen package manager
|
|
33
33
|
- After this, you can start scaffolding the main components of your application using generators. Use the \`list-generators\` tool to discover available generators, and the \`generator-guide\` tool for more detailed information about a specific generator
|
|
34
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general-guidance.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/general-guidance.ts"],"names":[],"mappings":";;;AAMA,sCAA6C;AAC7C,sDAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"general-guidance.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/general-guidance.ts"],"names":[],"mappings":";;;AAMA,sCAA6C;AAC7C,sDAAoE;AACpE,6DAA0D;AAE7C,QAAA,oBAAoB,GAAG;;;;;gGAK4D,CAAC;AAEjG;;GAEG;AACI,MAAM,sBAAsB,GAAG,CACpC,MAAiB,EACjB,UAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,oFAAoF;KACvF,EACD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE;;EAEd,4BAAoB;;;;2DAIqC,yBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;iFACL,6BAAa,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;EAOvG,yBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,+BAAc,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkC3E,MAAM,IAAA,gCAAe,EAAC,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,EAAE,UAAU,CAAC;;KAExE;aACI;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAtEW,QAAA,sBAAsB,0BAsEjC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
|
-
import { NxGeneratorInfo } from '../../utils/
|
|
6
|
+
import { NxGeneratorInfo } from '../../utils/generators';
|
|
7
7
|
/**
|
|
8
8
|
* Add a tool which provides a detailed guide for an individual generator
|
|
9
9
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
|
-
import { NxGeneratorInfo } from '../../utils/
|
|
6
|
+
import { NxGeneratorInfo } from '../../utils/generators';
|
|
7
7
|
/**
|
|
8
8
|
* Adds a tool which lists details about the available generators
|
|
9
9
|
*/
|
|
@@ -74,6 +74,9 @@ async function terraformProjectGenerator(tree, schema) {
|
|
|
74
74
|
build: {
|
|
75
75
|
dependsOn: ['fmt', 'test', `${sharedTfProjectName}:build`],
|
|
76
76
|
},
|
|
77
|
+
deploy: {
|
|
78
|
+
dependsOn: ['apply'],
|
|
79
|
+
},
|
|
77
80
|
destroy: {
|
|
78
81
|
executor: 'nx:run-commands',
|
|
79
82
|
defaultConfiguration: 'dev',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/terraform/project/generator.ts"],"names":[],"mappings":";;;AA2CA,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/terraform/project/generator.ts"],"names":[],"mappings":";;;AA2CA,8DAuQC;AAlTD;;;GAGG;AACH,uCAcoB;AAEpB,sDAAyD;AACzD,+BAAsC;AACtC,+CAAoD;AACpD,uCAIwB;AACxB,yCAAkD;AAClD,mDAAoD;AACpD,iDAAsE;AACtE,qEAA0E;AAC1E,uCAA4C;AAC5C,yFAGiD;AACjD,6CAA8C;AAE9C,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AACnC,QAAA,gCAAgC,GAC3C,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAExB,KAAK,UAAU,yBAAyB,CAC7C,IAAU,EACV,MAAuC;IAEvC,sDAAsD;IACtD,MAAM,GAAG,GAAG,IAAA,2BAAe,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1C,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,GAAG,IAAA,2BAAe,EAAC,IAAI,EAAE;QACxE,IAAI,EAAE,mDAAqB;KAC5B,CAAC,CAAC;IAEH,MAAM,wBAAwB,GAAG,IAAA,eAAQ,EACvC,IAAA,WAAI,EAAC,IAAI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AAgB;QACxB,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAClC,EACD,CAAC;QACD,MAAM,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,gBAAgB,CAAC,CAAC;QAC/D,IAAA,qBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED,qDAAqD;IACrD,MAAM,IAAA,6CAAyB,EAAC,IAAI,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC;IAEpE,wBAAwB;IACxB,MAAM,IAAA,yCAA+B,EAAC,IAAI,EAAE;QAC1C,wCAAgC;KACjC,CAAC,CAAC;IAEH,IAAA,qCAA4B,EAC1B,IAAI,EACJ,EAAE,EACF,IAAA,uBAAY,EAAC,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC,CACvD,CAAC;IAEF,gFAAgF;IAChF,sDAAsD;IACtD,8EAA8E;IAC9E,IAAI,IAAA,6BAAoB,GAAE,KAAK,KAAK,EAAE,CAAC;QACrC,IAAA,mBAAU,EAAC,IAAI,EAAE,cAAc,EAAE,CAAC,WAAW,EAAE,EAAE;YAC/C,WAAW,CAAC,SAAS,GAAG;gBACtB,GAAG,WAAW,CAAC,SAAS;gBACxB,GAAG,IAAA,uBAAY,EAAC,CAAC,YAAY,CAAC,CAAC;aAChC,CAAC;YACF,OAAO,WAAW,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC;AACD,kBAAe,yBAAyB,CAAC"}
|
|
@@ -225,7 +225,11 @@ exports[`ts#nx-plugin generator > should generate MCP server files > test-plugin
|
|
|
225
225
|
"import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
226
226
|
import { z } from 'zod';
|
|
227
227
|
import { PackageManagerSchema } from '../schema';
|
|
228
|
-
import {
|
|
228
|
+
import {
|
|
229
|
+
buildCreateCommand,
|
|
230
|
+
buildInstallCommand,
|
|
231
|
+
getPackageName,
|
|
232
|
+
} from '../utils';
|
|
229
233
|
|
|
230
234
|
/**
|
|
231
235
|
* Registers a tool which tells a model how to create an Nx workspace
|
|
@@ -248,7 +252,7 @@ export const registerCreateWorkspaceCommandTool = (server: McpServer) => {
|
|
|
248
252
|
text: \`Run the following command to create a workspace:
|
|
249
253
|
|
|
250
254
|
\\\`\\\`\\\`bash
|
|
251
|
-
|
|
255
|
+
\${buildCreateCommand(packageManager, workspaceName)}
|
|
252
256
|
\\\`\\\`\\\`
|
|
253
257
|
|
|
254
258
|
This will create a new workspace within the \${workspaceName} directory.
|
|
@@ -450,6 +454,16 @@ export const buildNxCommand = (command: string, pm?: string) =>
|
|
|
450
454
|
: ''
|
|
451
455
|
}nx \${command}\`;
|
|
452
456
|
|
|
457
|
+
const CREATE_COMMANDS: Record<string, string> = {
|
|
458
|
+
npm: 'npm create',
|
|
459
|
+
pnpm: 'pnpm create',
|
|
460
|
+
yarn: 'yarn create',
|
|
461
|
+
bun: 'bun create',
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
export const buildCreateCommand = (pm: string, workspaceName: string) =>
|
|
465
|
+
\`\${CREATE_COMMANDS[pm] ?? \`\${pm} create\`} @aws/nx-workspace \${pm === 'npm' ? '-- ' : ''}\${workspaceName}\`;
|
|
466
|
+
|
|
453
467
|
export const buildInstallCommand = (pm: string, pkg: string) =>
|
|
454
468
|
({
|
|
455
469
|
pnpm: \`pnpm add -Dw \${pkg}\`,
|
|
@@ -462,7 +476,7 @@ const renderSchema = (schema: any) =>
|
|
|
462
476
|
Object.entries(schema.properties)
|
|
463
477
|
.map(
|
|
464
478
|
([parameter, parameterSchema]: [string, any]) =>
|
|
465
|
-
\`- \${parameter} [type: \${parameterSchema.type}]\${(schema.required ?? []).includes(parameter) ? \` (required)\` : ''} \${parameterSchema.description}\`,
|
|
479
|
+
\`- \${parameter} [type: \${parameterSchema.type}]\${parameterSchema.enum ? \` [options: \${parameterSchema.enum.join(', ')}]\` : ''}\${(schema.required ?? []).includes(parameter) ? \` (required)\` : ''} \${parameterSchema.description}\`,
|
|
466
480
|
)
|
|
467
481
|
.join('\\n');
|
|
468
482
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { PackageManagerSchema } from '../schema';
|
|
4
|
-
import { buildInstallCommand, getPackageName } from '../utils';
|
|
4
|
+
import { buildCreateCommand, buildInstallCommand, getPackageName } from '../utils';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Registers a tool which tells a model how to create an Nx workspace
|
|
@@ -20,7 +20,7 @@ export const registerCreateWorkspaceCommandTool = (server: McpServer) => {
|
|
|
20
20
|
text: `Run the following command to create a workspace:
|
|
21
21
|
|
|
22
22
|
\`\`\`bash
|
|
23
|
-
|
|
23
|
+
${buildCreateCommand(packageManager, workspaceName)}
|
|
24
24
|
\`\`\`
|
|
25
25
|
|
|
26
26
|
This will create a new workspace within the ${workspaceName} directory.
|
|
@@ -41,6 +41,16 @@ export const buildNxCommand = (command: string, pm?: string) =>
|
|
|
41
41
|
: ''
|
|
42
42
|
}nx ${command}`;
|
|
43
43
|
|
|
44
|
+
const CREATE_COMMANDS: Record<string, string> = {
|
|
45
|
+
npm: 'npm create',
|
|
46
|
+
pnpm: 'pnpm create',
|
|
47
|
+
yarn: 'yarn create',
|
|
48
|
+
bun: 'bun create',
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const buildCreateCommand = (pm: string, workspaceName: string) =>
|
|
52
|
+
`${CREATE_COMMANDS[pm] ?? `${pm} create`} @aws/nx-workspace ${pm === 'npm' ? '-- ' : ''}${workspaceName}`;
|
|
53
|
+
|
|
44
54
|
export const buildInstallCommand = (pm: string, pkg: string) =>
|
|
45
55
|
({
|
|
46
56
|
pnpm: `pnpm add -Dw ${pkg}`,
|
|
@@ -53,7 +63,7 @@ const renderSchema = (schema: any) =>
|
|
|
53
63
|
Object.entries(schema.properties)
|
|
54
64
|
.map(
|
|
55
65
|
([parameter, parameterSchema]: [string, any]) =>
|
|
56
|
-
`- ${parameter} [type: ${parameterSchema.type}]${(schema.required ?? []).includes(parameter) ? ` (required)` : ''} ${parameterSchema.description}`,
|
|
66
|
+
`- ${parameter} [type: ${parameterSchema.type}]${parameterSchema.enum ? ` [options: ${parameterSchema.enum.join(', ')}]` : ''}${(schema.required ?? []).includes(parameter) ? ` (required)` : ''} ${parameterSchema.description}`,
|
|
57
67
|
)
|
|
58
68
|
.join('\n');
|
|
59
69
|
|
|
@@ -13,7 +13,6 @@ const format_1 = require("../../utils/format");
|
|
|
13
13
|
const generator_1 = tslib_1.__importStar(require("../lib/generator"));
|
|
14
14
|
const utils_1 = require("./utils");
|
|
15
15
|
const generator_2 = tslib_1.__importDefault(require("../mcp-server/generator"));
|
|
16
|
-
const versions_1 = require("../../utils/versions");
|
|
17
16
|
exports.TS_NX_PLUGIN_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
18
17
|
const tsNxPluginGenerator = async (tree, options) => {
|
|
19
18
|
// Generate a TypeScript project as the base
|
|
@@ -84,7 +83,6 @@ const tsNxPluginGenerator = async (tree, options) => {
|
|
|
84
83
|
// Add generator MCP server
|
|
85
84
|
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', 'mcp-server'), mcpPath, {
|
|
86
85
|
name: fullyQualifiedName,
|
|
87
|
-
createNxWorkspaceVersion: versions_1.TS_VERSIONS['create-nx-workspace'],
|
|
88
86
|
}, { overwriteStrategy: devkit_1.OverwriteStrategy.KeepExisting });
|
|
89
87
|
(0, nx_1.addGeneratorMetadata)(tree, project.name, exports.TS_NX_PLUGIN_GENERATOR_INFO);
|
|
90
88
|
await (0, metrics_1.addGeneratorMetricsIfApplicable)(tree, [exports.TS_NX_PLUGIN_GENERATOR_INFO]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/nx-plugin/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCASoB;AAEpB,uCAKwB;AACxB,iDAAsE;AACtE,+CAA0D;AAC1D,sEAAuE;AACvE,mCAAuD;AACvD,gFAA2D;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/nx-plugin/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCASoB;AAEpB,uCAKwB;AACxB,iDAAsE;AACtE,+CAA0D;AAC1D,sEAAuE;AACvE,mCAAuD;AACvD,gFAA2D;AAE9C,QAAA,2BAA2B,GACtC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAExB,MAAM,mBAAmB,GAAG,KAAK,EACtC,IAAU,EACV,OAAkC,EACN,EAAE;IAC9B,4CAA4C;IAC5C,MAAM,EAAE,kBAAkB,EAAE,GAAG,EAAE,GAAG,IAAA,2BAAe,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnE,MAAM,IAAA,mBAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAExC,mDAAmD;IACnD,IAAA,oCAA4B,EAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;IAEvD,+EAA+E;IAC/E,MAAM,OAAO,GAAG,IAAA,wCAAmC,EAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;IAC9E,OAAO,CAAC,OAAO,GAAG;QAChB,GAAG,OAAO,CAAC,OAAO;QAClB,OAAO,EAAE;YACP,QAAQ,EAAE,YAAY;YACtB,OAAO,EAAE,CAAC,sBAAsB,CAAC;YACjC,OAAO,EAAE;gBACP,UAAU,EAAE,4BAA4B;gBACxC,IAAI,EAAE,4BAA4B;gBAClC,QAAQ,EAAE,iCAAiC;gBAC3C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IACrC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAC3B,IAAI,CAAC,MAAM,CAAC,IAAA,0BAAiB,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC3D,IAAI,CAAC,MAAM,CAAC,IAAA,0BAAiB,EAAC,OAAO,EAAE,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAE3E,2BAA2B;IAC3B,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,OAAO,EAAE,YAAY,CAAC,EACnD,OAAO,EACP;QACE,IAAI,EAAE,kBAAkB;KACzB,EACD,EAAE,iBAAiB,EAAE,0BAAiB,CAAC,YAAY,EAAE,CACtD,CAAC;IAEF,IAAA,yBAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,mCAA2B,CAAC,CAAC;IAEtE,MAAM,IAAA,yCAA+B,EAAC,IAAI,EAAE,CAAC,mCAA2B,CAAC,CAAC,CAAC;IAE3E,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;IACjC,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC,CAAC;AAjGW,QAAA,mBAAmB,uBAiG9B;AAEF,kBAAe,2BAAmB,CAAC"}
|
package/src/utils/commands.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* Display-friendly command prefixes for each package manager.
|
|
3
7
|
*
|
|
@@ -12,6 +16,8 @@ export interface PackageManagerDisplayCommands {
|
|
|
12
16
|
exec: string;
|
|
13
17
|
/** Prefix for running package.json scripts: `npm run`, pnpm, yarn, bun */
|
|
14
18
|
run: string;
|
|
19
|
+
/** Prefix for `create` commands: `npm create`, `pnpm create`, etc. */
|
|
20
|
+
create: string;
|
|
15
21
|
}
|
|
16
22
|
export declare const PACKAGE_MANAGER_COMMANDS: Record<string, PackageManagerDisplayCommands>;
|
|
17
23
|
/**
|
|
@@ -27,7 +33,15 @@ export declare const buildPackageManagerShortCommand: (pm: string, command: stri
|
|
|
27
33
|
*/
|
|
28
34
|
export declare const buildInstallCommand: (pm: string, pkg: string, dev: boolean) => string;
|
|
29
35
|
/**
|
|
30
|
-
* Build a create-nx-workspace
|
|
31
|
-
*
|
|
36
|
+
* Build a command to create a new workspace using @aws/create-nx-workspace.
|
|
37
|
+
*
|
|
38
|
+
* Uses the `create` shorthand for each package manager:
|
|
39
|
+
* npm create @aws/nx-workspace my-project
|
|
40
|
+
* pnpm create @aws/nx-workspace my-project
|
|
41
|
+
* yarn create @aws/nx-workspace my-project
|
|
42
|
+
* bun create @aws/nx-workspace my-project
|
|
43
|
+
*
|
|
44
|
+
* The package manager is auto-detected by @aws/create-nx-workspace from the
|
|
45
|
+
* invoking command, so --pm is not needed.
|
|
32
46
|
*/
|
|
33
|
-
export declare const buildCreateNxWorkspaceCommand: (pm: string, workspace: string, iacProvider?: "CDK" | "Terraform"
|
|
47
|
+
export declare const buildCreateNxWorkspaceCommand: (pm: string, workspace: string, iacProvider?: "CDK" | "Terraform") => string;
|
package/src/utils/commands.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildCreateNxWorkspaceCommand = exports.buildInstallCommand = exports.buildPackageManagerShortCommand = exports.buildPackageManagerExecCommand = exports.PACKAGE_MANAGER_COMMANDS = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
-
*/
|
|
8
|
-
const versions_1 = require("./versions");
|
|
9
4
|
exports.PACKAGE_MANAGER_COMMANDS = {
|
|
10
|
-
npm: { exec: 'npx', run: 'npm run' },
|
|
11
|
-
pnpm: { exec: 'pnpm', run: 'pnpm' },
|
|
12
|
-
yarn: { exec: 'yarn', run: 'yarn' },
|
|
13
|
-
bun: { exec: 'bunx', run: 'bun' },
|
|
5
|
+
npm: { exec: 'npx', run: 'npm run', create: 'npm create' },
|
|
6
|
+
pnpm: { exec: 'pnpm', run: 'pnpm', create: 'pnpm create' },
|
|
7
|
+
yarn: { exec: 'yarn', run: 'yarn', create: 'yarn create' },
|
|
8
|
+
bun: { exec: 'bunx', run: 'bun', create: 'bun create' },
|
|
14
9
|
};
|
|
15
10
|
/**
|
|
16
11
|
* Build a package manager exec command (e.g. pnpm cmd, npx cmd, bunx cmd)
|
|
@@ -47,9 +42,28 @@ const buildInstallCommand = (pm, pkg, dev) => {
|
|
|
47
42
|
};
|
|
48
43
|
exports.buildInstallCommand = buildInstallCommand;
|
|
49
44
|
/**
|
|
50
|
-
* Build a create-nx-workspace
|
|
51
|
-
*
|
|
45
|
+
* Build a command to create a new workspace using @aws/create-nx-workspace.
|
|
46
|
+
*
|
|
47
|
+
* Uses the `create` shorthand for each package manager:
|
|
48
|
+
* npm create @aws/nx-workspace my-project
|
|
49
|
+
* pnpm create @aws/nx-workspace my-project
|
|
50
|
+
* yarn create @aws/nx-workspace my-project
|
|
51
|
+
* bun create @aws/nx-workspace my-project
|
|
52
|
+
*
|
|
53
|
+
* The package manager is auto-detected by @aws/create-nx-workspace from the
|
|
54
|
+
* invoking command, so --pm is not needed.
|
|
52
55
|
*/
|
|
53
|
-
const buildCreateNxWorkspaceCommand = (pm, workspace, iacProvider
|
|
56
|
+
const buildCreateNxWorkspaceCommand = (pm, workspace, iacProvider) => {
|
|
57
|
+
const createPrefix = exports.PACKAGE_MANAGER_COMMANDS[pm]?.create ?? `${pm} create`;
|
|
58
|
+
const parts = [
|
|
59
|
+
createPrefix,
|
|
60
|
+
'@aws/nx-workspace',
|
|
61
|
+
// npm requires '--' to stop interpreting subsequent flags as npm config
|
|
62
|
+
...(pm === 'npm' ? ['--'] : []),
|
|
63
|
+
workspace,
|
|
64
|
+
...(iacProvider ? [`--iacProvider=${iacProvider}`] : []),
|
|
65
|
+
];
|
|
66
|
+
return parts.join(' ');
|
|
67
|
+
};
|
|
54
68
|
exports.buildCreateNxWorkspaceCommand = buildCreateNxWorkspaceCommand;
|
|
55
69
|
//# sourceMappingURL=commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/commands.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/commands.ts"],"names":[],"mappings":";;;AAsBa,QAAA,wBAAwB,GAGjC;IACF,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE;IAC1D,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE;IAC1D,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE;IAC1D,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE;CACxD,CAAC;AAEF;;GAEG;AACI,MAAM,8BAA8B,GAAG,CAAC,EAAU,EAAE,OAAe,EAAE,EAAE;IAC5E,MAAM,MAAM,GAAG,gCAAwB,CAAC,EAAE,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC;IACxD,OAAO,GAAG,MAAM,IAAI,OAAO,EAAE,CAAC;AAChC,CAAC,CAAC;AAHW,QAAA,8BAA8B,kCAGzC;AAEF;;GAEG;AACI,MAAM,+BAA+B,GAAG,CAC7C,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,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/B,SAAS;QACT,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,iBAAiB,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACzD,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC,CAAC;AAfW,QAAA,6BAA6B,iCAexC"}
|
|
@@ -7,6 +7,10 @@ export interface GeneratorInfo {
|
|
|
7
7
|
readonly description: string;
|
|
8
8
|
readonly guidePages?: string[];
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Alias for GeneratorInfo used by MCP server and generators
|
|
12
|
+
*/
|
|
13
|
+
export type NxGeneratorInfo = GeneratorInfo;
|
|
10
14
|
/**
|
|
11
15
|
* Build the list of generator info, resolving schema/factory paths relative to the given base directory.
|
|
12
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/generators.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,oFAAmD;AACnD,mDAA6B;
|
|
1
|
+
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/generators.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,oFAAmD;AACnD,mDAA6B;AAiB7B;;GAEG;AACI,MAAM,sBAAsB,GAAG,CAAC,OAAe,EAAmB,EAAE,CACzE,MAAM,CAAC,OAAO,CAAE,yBAAsC,CAAC,UAAU,CAAC,CAAC,GAAG,CACpE,CAAC,CAAC,EAAE,EAAE,IAAI,CAAgB,EAAE,EAAE,CAAC,CAAC;IAC9B,EAAE;IACF,MAAM,EAAE,IAAI,CAAC,MAAM;IACnB,mBAAmB,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;IACxD,kBAAkB,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;IACtD,WAAW,EAAE,IAAI,CAAC,WAAW;IAC7B,GAAG,CAAC,QAAQ,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACnE,GAAG,CAAC,YAAY,IAAI,IAAI,IAAI,IAAI,CAAC,UAAU;QACzC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;QACjC,CAAC,CAAC,EAAE,CAAC;CACR,CAAC,CACH,CAAC;AAbS,QAAA,sBAAsB,0BAa/B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
export declare const IAC_PROVIDERS: readonly ["CDK", "Terraform"];
|
|
6
|
+
export type IacProvider = (typeof IAC_PROVIDERS)[number];
|
|
7
|
+
export type IacProviderOption = IacProvider | 'Inherit';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.IAC_PROVIDERS = void 0;
|
|
8
|
+
exports.IAC_PROVIDERS = ['CDK', 'Terraform'];
|
|
9
|
+
//# sourceMappingURL=iac-providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iac-providers.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/iac-providers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEU,QAAA,aAAa,GAAG,CAAC,KAAK,EAAE,WAAW,CAAU,CAAC"}
|
package/src/utils/iac.d.ts
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { Tree } from '@nx/devkit';
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
export type IacProviderOption = IacProvider | 'Inherit';
|
|
6
|
+
export { IAC_PROVIDERS, type IacProvider, type IacProviderOption, } from './iac-providers';
|
|
7
|
+
import { IAC_PROVIDERS } from './iac-providers';
|
|
9
8
|
/**
|
|
10
9
|
* Configuration for infrastructure as code
|
|
11
10
|
*/
|
|
@@ -13,9 +12,9 @@ export interface IacConfig {
|
|
|
13
12
|
/**
|
|
14
13
|
* Default provider for infrastructure as code
|
|
15
14
|
*/
|
|
16
|
-
provider:
|
|
15
|
+
provider: (typeof IAC_PROVIDERS)[number];
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
19
18
|
* Given an iac provider option, resolve the actual iac provider to use
|
|
20
19
|
*/
|
|
21
|
-
export declare const resolveIacProvider: (tree: Tree, iacProviderOption:
|
|
20
|
+
export declare const resolveIacProvider: (tree: Tree, iacProviderOption: "CDK" | "Terraform" | "Inherit") => Promise<(typeof IAC_PROVIDERS)[number]>;
|
package/src/utils/iac.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveIacProvider = exports.IAC_PROVIDERS = void 0;
|
|
4
4
|
const utils_1 = require("./config/utils");
|
|
5
|
-
|
|
5
|
+
var iac_providers_1 = require("./iac-providers");
|
|
6
|
+
Object.defineProperty(exports, "IAC_PROVIDERS", { enumerable: true, get: function () { return iac_providers_1.IAC_PROVIDERS; } });
|
|
7
|
+
const iac_providers_2 = require("./iac-providers");
|
|
6
8
|
/**
|
|
7
9
|
* Given an iac provider option, resolve the actual iac provider to use
|
|
8
10
|
*/
|
|
@@ -12,8 +14,8 @@ const resolveIacProvider = async (tree, iacProviderOption) => {
|
|
|
12
14
|
if (!pluginConfig?.iac?.provider) {
|
|
13
15
|
throw new Error(`IaC provider "Inherit" requires iac.provider to be set in ${utils_1.AWS_NX_PLUGIN_CONFIG_FILE_NAME}`);
|
|
14
16
|
}
|
|
15
|
-
if (!
|
|
16
|
-
throw new Error(`iac.provider in ${utils_1.AWS_NX_PLUGIN_CONFIG_FILE_NAME} must be one of ${
|
|
17
|
+
if (!iac_providers_2.IAC_PROVIDERS.includes(pluginConfig.iac.provider)) {
|
|
18
|
+
throw new Error(`iac.provider in ${utils_1.AWS_NX_PLUGIN_CONFIG_FILE_NAME} must be one of ${iac_providers_2.IAC_PROVIDERS.join(', ')}`);
|
|
17
19
|
}
|
|
18
20
|
return pluginConfig.iac.provider;
|
|
19
21
|
}
|
package/src/utils/iac.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iac.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/iac.ts"],"names":[],"mappings":";;;AAKA,0CAGwB;
|
|
1
|
+
{"version":3,"file":"iac.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/iac.ts"],"names":[],"mappings":";;;AAKA,0CAGwB;AAExB,iDAIyB;AAHvB,8GAAA,aAAa,OAAA;AAIf,mDAAgD;AAYhD;;GAEG;AACI,MAAM,kBAAkB,GAAG,KAAK,EACrC,IAAU,EACV,iBAAkD,EACT,EAAE;IAC3C,IAAI,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpC,MAAM,YAAY,GAAG,MAAM,IAAA,6BAAqB,EAAC,IAAI,CAAC,CAAC;QAEvD,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CACb,6DAA6D,sCAA8B,EAAE,CAC9F,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,6BAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,KAAK,CACb,mBAAmB,sCAA8B,mBAAmB,6BAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC/F,CAAC;QACJ,CAAC;QAED,OAAO,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnC,CAAC;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC;AArBW,QAAA,kBAAkB,sBAqB7B"}
|
package/src/utils/nx.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { ProjectConfiguration, Tree } from '@nx/devkit';
|
|
6
|
-
|
|
7
|
-
export type NxGeneratorInfo = GeneratorInfo;
|
|
6
|
+
export type { NxGeneratorInfo, GeneratorInfo } from './generators';
|
|
8
7
|
export { buildGeneratorInfoList } from './generators';
|
|
8
|
+
import { type GeneratorInfo } from './generators';
|
|
9
9
|
/**
|
|
10
10
|
* List Nx Plugin for AWS generators
|
|
11
11
|
* @param includeHidden include hidden generators (default false)
|
|
@@ -14,7 +14,7 @@ export declare const listGenerators: (includeHidden?: boolean) => GeneratorInfo[
|
|
|
14
14
|
/**
|
|
15
15
|
* Return generator information. Call this from a generator method with __filename
|
|
16
16
|
*/
|
|
17
|
-
export declare const getGeneratorInfo: (generatorFileName: string) =>
|
|
17
|
+
export declare const getGeneratorInfo: (generatorFileName: string) => GeneratorInfo;
|
|
18
18
|
export declare const getPackageVersion: () => string;
|
|
19
19
|
/**
|
|
20
20
|
* Read a project configuration where the project name may not be fully qualified (ie may omit the scope prefix)
|
|
@@ -23,7 +23,9 @@ export declare const readProjectConfigurationUnqualified: (tree: Tree, projectNa
|
|
|
23
23
|
/**
|
|
24
24
|
* Add metadata about the generator that generated the project to the project.json
|
|
25
25
|
*/
|
|
26
|
-
export declare const addGeneratorMetadata: (tree: Tree, projectName: string, info:
|
|
26
|
+
export declare const addGeneratorMetadata: (tree: Tree, projectName: string, info: {
|
|
27
|
+
id: string;
|
|
28
|
+
}, additionalMetadata?: {
|
|
27
29
|
[key: string]: any;
|
|
28
30
|
}) => void;
|
|
29
31
|
/**
|
|
@@ -38,7 +40,9 @@ export interface ComponentMetadata {
|
|
|
38
40
|
/**
|
|
39
41
|
* Add metadata about the generator that generated the component to the project.json
|
|
40
42
|
*/
|
|
41
|
-
export declare const addComponentGeneratorMetadata: (tree: Tree, projectName: string, info:
|
|
43
|
+
export declare const addComponentGeneratorMetadata: (tree: Tree, projectName: string, info: {
|
|
44
|
+
id: string;
|
|
45
|
+
}, componentPath: string, componentName?: string, additionalMetadata?: {
|
|
42
46
|
[key: string]: any;
|
|
43
47
|
}) => void;
|
|
44
48
|
/**
|
package/src/utils/nx.js
CHANGED
|
@@ -11,10 +11,10 @@ const package_json_1 = tslib_1.__importDefault(require("../../package.json"));
|
|
|
11
11
|
const path = tslib_1.__importStar(require("path"));
|
|
12
12
|
const npm_scope_1 = require("./npm-scope");
|
|
13
13
|
const names_1 = require("./names");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const GENERATORS = (0,
|
|
14
|
+
var generators_1 = require("./generators");
|
|
15
|
+
Object.defineProperty(exports, "buildGeneratorInfoList", { enumerable: true, get: function () { return generators_1.buildGeneratorInfoList; } });
|
|
16
|
+
const generators_2 = require("./generators");
|
|
17
|
+
const GENERATORS = (0, generators_2.buildGeneratorInfoList)(path.resolve(__dirname, '..', '..'));
|
|
18
18
|
/**
|
|
19
19
|
* List Nx Plugin for AWS generators
|
|
20
20
|
* @param includeHidden include hidden generators (default false)
|
package/src/utils/nx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nx.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/nx.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAMoB;AACpB,8EAA6C;AAC7C,mDAA6B;AAC7B,2CAA6D;AAC7D,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