@conformetry/nx 0.0.19 โ 0.0.20
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/CHANGELOG.md +6 -0
- package/README.md +26 -22
- package/dist/src/generators/sync/generator.d.ts +11 -3
- package/dist/src/generators/sync/generator.js +1 -1
- package/dist/src/index.d.ts +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -70,6 +70,10 @@ one.
|
|
|
70
70
|
`nx g @conformetry/nx:anything` resolves nothing by design โ which generators
|
|
71
71
|
exist is a property of your configuration, not of this package.
|
|
72
72
|
|
|
73
|
+
`sync` runs both ways: `nx sync` and `nx sync:check` use it as the global sync
|
|
74
|
+
generator, and `nx g @conformetry/nx:sync` runs it directly, writing the
|
|
75
|
+
emitted plugin.
|
|
76
|
+
|
|
73
77
|
## Generating
|
|
74
78
|
|
|
75
79
|
```bash
|
|
@@ -148,9 +152,9 @@ Call stacks traced through `projects/ic-suite/conformetry/conformetry-nx`, deepe
|
|
|
148
152
|
|
|
149
153
|
| Measure | Value |
|
|
150
154
|
| --- | --- |
|
|
151
|
-
| Callables |
|
|
155
|
+
| Callables | 115 |
|
|
152
156
|
| Files | 47 |
|
|
153
|
-
| Calls traced |
|
|
157
|
+
| Calls traced | 139 |
|
|
154
158
|
| Call stacks | 8 |
|
|
155
159
|
| Deepest stack | 15 |
|
|
156
160
|
| Stacks through recursion | 0 |
|
|
@@ -284,7 +288,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
284
288
|
**5. `syncGenerator`** โ depth โฅ 11 ยท orphan-root
|
|
285
289
|
|
|
286
290
|
```text
|
|
287
|
-
๐ syncGenerator(
|
|
291
|
+
๐ syncGenerator(tree: Tree, options?: SyncGeneratorOptions): Promise<SyncGeneratorResult> [projects/ic-suite/conformetry/conformetry-nx/src/generators/sync/generator.ts:29]
|
|
288
292
|
โณ Regenerates the workspace's conformetry generator plugin.
|
|
289
293
|
โโ> GeneratorService.emitPlugin(args: EmitPluginArguments): Promise<EmittedFile[]> [projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/generator.service.ts:212]
|
|
290
294
|
โณ Returns every file the consumer's generator plugin consists of.
|
|
@@ -341,7 +345,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
341
345
|
| --- | --- | --- | --- |
|
|
342
346
|
| `PluginService.runGenerator` | 9 | `PluginService.resolveOptions`, `PluginService.assertPluginInSync`, `ConfigurationService.loadConformetryConfiguration`, `PluginService.find(โฆ)`, `PluginService.map(โฆ)`, `AdapterService.createAdapters`, `OptionsService.resolveGeneratorInputs`, `GenerationService.runGenerator`, `PathsService.resolveGenerationPath` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:330` |
|
|
343
347
|
| `bootstrapPlugin` | 9 | `resolveGeneratorService`, `resolveOptionsService`, `resolveProjectsService`, `GeneratorService.emitPlugin`, `OptionsService.resolveConfigurationPath`, `readNxConfiguration`, `ProjectsService.listWorkspaceProjects`, `writePlugin`, `linkPlugin` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts:39` |
|
|
344
|
-
| `syncGenerator` |
|
|
348
|
+
| `syncGenerator` | 8 | `resolveGeneratorService`, `resolveOptionsService`, `resolveProjectsService`, `GeneratorService.emitPlugin`, `OptionsService.resolveConfigurationPath`, `readNxConfiguration`, `ProjectsService.listWorkspaceProjects`, `assign(โฆ)` | `projects/ic-suite/conformetry/conformetry-nx/src/generators/sync/generator.ts:29` |
|
|
345
349
|
|
|
346
350
|
<details>
|
|
347
351
|
<summary>55 more callables</summary>
|
|
@@ -717,14 +721,14 @@ graph LR
|
|
|
717
721
|
|
|
718
722
|
### Project
|
|
719
723
|
|
|
720
|
-

|
|
725
|
+

|
|
722
726
|

|
|
723
727
|

|
|
724
728
|
|
|
725
729
|
### Measured Targets
|
|
726
730
|
|
|
727
|
-

|
|
728
732
|
|
|
729
733
|
### TypeScript
|
|
730
734
|
|
|
@@ -733,7 +737,7 @@ graph LR
|
|
|
733
737
|

|
|
734
738
|

|
|
735
739
|

|
|
736
|
-

|
|
737
741
|

|
|
738
742
|
|
|
739
743
|
### JavaScript
|
|
@@ -742,15 +746,15 @@ graph LR
|
|
|
742
746
|

|
|
743
747
|

|
|
744
748
|

|
|
745
|
-

|
|
746
750
|

|
|
747
|
-

|
|
752
|
+

|
|
753
|
+

|
|
750
754
|

|
|
751
|
-

|
|
756
|
+

|
|
757
|
+

|
|
754
758
|

|
|
755
759
|
|
|
756
760
|
### Python
|
|
@@ -906,20 +910,20 @@ graph LR
|
|
|
906
910
|
### Markdown
|
|
907
911
|
|
|
908
912
|

|
|
909
|
-

|
|
910
914
|

|
|
911
|
-

|
|
916
|
+

|
|
913
917
|

|
|
914
918
|

|
|
915
919
|

|
|
916
|
-

|
|
921
|
+

|
|
922
|
+

|
|
919
923
|

|
|
920
924
|

|
|
921
925
|

|
|
922
|
-

|
|
923
927
|

|
|
924
928
|

|
|
925
929
|

|
|
@@ -8,9 +8,7 @@ import { Tree } from '@nx/devkit';
|
|
|
8
8
|
* fixes it. Writing through the tree rather than to disk is what makes the
|
|
9
9
|
* check possible: Nx compares the tree against the working copy.
|
|
10
10
|
*/
|
|
11
|
-
declare function syncGenerator(tree: Tree, options?: SyncGeneratorOptions): Promise<
|
|
12
|
-
outOfSyncMessage: string;
|
|
13
|
-
}>;
|
|
11
|
+
declare function syncGenerator(tree: Tree, options?: SyncGeneratorOptions): Promise<SyncGeneratorResult>;
|
|
14
12
|
export default syncGenerator;
|
|
15
13
|
|
|
16
14
|
/** Options accepted by the conformetry sync generator. */
|
|
@@ -23,4 +21,14 @@ declare interface SyncGeneratorOptions {
|
|
|
23
21
|
readonly packageName?: string;
|
|
24
22
|
}
|
|
25
23
|
|
|
24
|
+
/**
|
|
25
|
+
* What the sync generator returns.
|
|
26
|
+
*
|
|
27
|
+
* Nx's sync runner reads `outOfSyncMessage`, while `nx g` invokes a generator's
|
|
28
|
+
* return value as a callback, so the result is a no-op function carrying it.
|
|
29
|
+
*/
|
|
30
|
+
declare type SyncGeneratorResult = (() => void) & {
|
|
31
|
+
readonly outOfSyncMessage: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
26
34
|
export { }
|
|
@@ -11,7 +11,7 @@ async function syncGenerator(e, a) {
|
|
|
11
11
|
projects: c.listWorkspaceProjects(e.root)
|
|
12
12
|
});
|
|
13
13
|
for (let t of l) e.write(t.filePath, t.content);
|
|
14
|
-
return { outOfSyncMessage: i };
|
|
14
|
+
return Object.assign(() => {}, { outOfSyncMessage: i });
|
|
15
15
|
}
|
|
16
16
|
function readNxConfiguration(t) {
|
|
17
17
|
let n = t.read(e, "utf8");
|
package/dist/src/index.d.ts
CHANGED
|
@@ -977,9 +977,9 @@ export declare function runBootstrapCli(workspaceRoot: string): Promise<void>;
|
|
|
977
977
|
* Runs one configured generator against an Nx tree.
|
|
978
978
|
*
|
|
979
979
|
* This is the machinery a consumer's generated generator wrappers call. The
|
|
980
|
-
* published package
|
|
981
|
-
* generators exist is a property of the consumer's
|
|
982
|
-
*
|
|
980
|
+
* published package declares no scaffolding generators of its own, only
|
|
981
|
+
* `sync`: which generators exist is a property of the consumer's
|
|
982
|
+
* configuration, so `nx g @conformetry/nx:<anything else>` resolves nothing by
|
|
983
983
|
* design.
|
|
984
984
|
*/
|
|
985
985
|
export declare function runConformetryGenerator(args: {
|
package/package.json
CHANGED