@simplysf/simply-aep 0.15.8 → 0.16.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/README.md +358 -17
- package/lib/commands/simply/aep/generate/domain.d.ts +21 -0
- package/lib/commands/simply/aep/generate/domain.js +41 -0
- package/lib/commands/simply/aep/generate/domain.js.map +1 -0
- package/lib/commands/simply/aep/generate/selector.d.ts +21 -0
- package/lib/commands/simply/aep/generate/selector.js +41 -0
- package/lib/commands/simply/aep/generate/selector.js.map +1 -0
- package/lib/commands/simply/aep/generate/service.d.ts +21 -0
- package/lib/commands/simply/aep/generate/service.js +45 -0
- package/lib/commands/simply/aep/generate/service.js.map +1 -0
- package/lib/commands/simply/aep/generate/unit-of-work.d.ts +22 -0
- package/lib/commands/simply/aep/generate/unit-of-work.js +42 -0
- package/lib/commands/simply/aep/generate/unit-of-work.js.map +1 -0
- package/lib/commands/simply/aep/generate.d.ts +25 -0
- package/lib/commands/simply/aep/generate.js +45 -0
- package/lib/commands/simply/aep/generate.js.map +1 -0
- package/lib/common/generate/flags.d.ts +27 -0
- package/lib/common/generate/flags.js +63 -0
- package/lib/common/generate/flags.js.map +1 -0
- package/lib/common/generate/runGeneration.d.ts +52 -0
- package/lib/common/generate/runGeneration.js +196 -0
- package/lib/common/generate/runGeneration.js.map +1 -0
- package/messages/simply.aep.generate.common.md +78 -0
- package/messages/simply.aep.generate.domain.md +19 -0
- package/messages/simply.aep.generate.md +37 -0
- package/messages/simply.aep.generate.selector.md +19 -0
- package/messages/simply.aep.generate.service.md +23 -0
- package/messages/simply.aep.generate.unit-of-work.md +23 -0
- package/oclif.manifest.json +1510 -764
- package/package.json +7 -5
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# flags.sobject.summary
|
|
2
|
+
|
|
3
|
+
API name of the SObject to generate for. The generators describe it in --target-org.
|
|
4
|
+
|
|
5
|
+
# flags.optional-target-org.summary
|
|
6
|
+
|
|
7
|
+
Org whose API version the generated metadata declares, when --api-version isn't given. Nothing is read from it.
|
|
8
|
+
|
|
9
|
+
# flags.flavor.summary
|
|
10
|
+
|
|
11
|
+
Framework to generate for: at4dx or fflib.
|
|
12
|
+
|
|
13
|
+
# flags.flavor.description
|
|
14
|
+
|
|
15
|
+
Sets the templates for every file: the interface and implementation shape, base classes, and whether Application Factory binding records are written. fflib writes none; at4dx writes one per layer.
|
|
16
|
+
|
|
17
|
+
# flags.prefix.summary
|
|
18
|
+
|
|
19
|
+
Class-name prefix, upper-cased and joined with an underscore (--prefix acme gives ACME_Accounts).
|
|
20
|
+
|
|
21
|
+
# flags.output-dir.summary
|
|
22
|
+
|
|
23
|
+
Directory to write into, relative to the project root unless absolute.
|
|
24
|
+
|
|
25
|
+
# flags.output-dir.description
|
|
26
|
+
|
|
27
|
+
Files go under main/classes, main/schema, and test/classes inside it. Defaults to generated-files, as apx's --output-path did, so generated paths don't move.
|
|
28
|
+
|
|
29
|
+
# flags.dry-run.summary
|
|
30
|
+
|
|
31
|
+
Show the files that would be written, and any validation issues, without writing anything.
|
|
32
|
+
|
|
33
|
+
# flags.overwrite.summary
|
|
34
|
+
|
|
35
|
+
Replace files that already exist at a planned path. Without it, the command refuses before writing anything.
|
|
36
|
+
|
|
37
|
+
# flags.force.summary
|
|
38
|
+
|
|
39
|
+
Write even if validation finds an error-severity issue the generated binding records would introduce. The issues are still printed and returned.
|
|
40
|
+
|
|
41
|
+
# error.sobjectNotFound
|
|
42
|
+
|
|
43
|
+
SObject %s wasn't found in the target org.
|
|
44
|
+
|
|
45
|
+
# error.nothingSelected
|
|
46
|
+
|
|
47
|
+
Select at least one artifact group: --selector, --domain, or --unit-of-work.
|
|
48
|
+
|
|
49
|
+
# error.filesExist
|
|
50
|
+
|
|
51
|
+
These files already exist, so nothing was written:
|
|
52
|
+
%s
|
|
53
|
+
|
|
54
|
+
# error.filesExist.actions
|
|
55
|
+
|
|
56
|
+
- Pass --overwrite to replace them.
|
|
57
|
+
- Use --output-dir to generate somewhere else.
|
|
58
|
+
|
|
59
|
+
# error.validationFailed
|
|
60
|
+
|
|
61
|
+
The generated binding records would introduce the error-severity issues above, so nothing was written.
|
|
62
|
+
|
|
63
|
+
# error.validationFailed.actions
|
|
64
|
+
|
|
65
|
+
- Fix the conflicting records, or
|
|
66
|
+
- Pass --force to write anyway.
|
|
67
|
+
|
|
68
|
+
# error.invalidOptions
|
|
69
|
+
|
|
70
|
+
%s
|
|
71
|
+
|
|
72
|
+
# warning.dryRunWouldRefuse
|
|
73
|
+
|
|
74
|
+
A real run would refuse to write: the generated binding records introduce error-severity issues. Pass --force to write anyway.
|
|
75
|
+
|
|
76
|
+
# warning.dryRunWouldOverwrite
|
|
77
|
+
|
|
78
|
+
A real run would refuse to write: %s planned file(s) already exist. Pass --overwrite to replace them.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate a domain class, its interface, test, and trigger, and its AT4DX binding for an SObject.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Describes --sobject in --target-org and scaffolds the domain into --output-dir: the implementation, its interface, a unit test, the trigger that hands every event to fflib_SObjectDomain.triggerHandler, and their -meta.xml files. With --flavor at4dx it also writes the ApplicationFactory_DomainBinding record.
|
|
8
|
+
|
|
9
|
+
An SObject can have only one Domain binding, so generating one where the project already has one fails validation; pass --force to write it anyway. See `simply aep generate --help` for the full --force and --overwrite rules.
|
|
10
|
+
|
|
11
|
+
# examples
|
|
12
|
+
|
|
13
|
+
- Generate an AT4DX domain for Account:
|
|
14
|
+
|
|
15
|
+
<%= config.bin %> <%= command.id %> --target-org myOrg --sobject Account --flavor at4dx
|
|
16
|
+
|
|
17
|
+
- Preview the files without writing them:
|
|
18
|
+
|
|
19
|
+
<%= config.bin %> <%= command.id %> --target-org myOrg --sobject Account --flavor at4dx --dry-run
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate selector, domain, and unit-of-work layers for an SObject in one run.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Describes --sobject in --target-org once and scaffolds every layer you select (at least one of --selector, --domain, or --unit-of-work) into --output-dir, sharing --flavor and --prefix. With --flavor at4dx each layer also gets its Application Factory binding record.
|
|
8
|
+
|
|
9
|
+
Before writing, the binding records are checked against the project's package directories and --output-dir with the rules `simply aep at4dx binding validate` uses. An error-severity issue they would introduce — a second Domain binding for the same SObject, say — stops the run unless you pass --force; problems that were already there don't. Existing files stop it too unless you pass --overwrite. Nothing is written in either case.
|
|
10
|
+
|
|
11
|
+
With --flavor fflib, --unit-of-work writes no file: fflib has no unit-of-work binding, so the command prints the Application factory entry to add by hand, and returns it as manualSteps.
|
|
12
|
+
|
|
13
|
+
# flags.sequence.summary
|
|
14
|
+
|
|
15
|
+
BindingSequence__c for the unit-of-work binding (at4dx only): where the SObject falls in the commit order, lower first.
|
|
16
|
+
|
|
17
|
+
# flags.selector.summary
|
|
18
|
+
|
|
19
|
+
Generate the selector layer.
|
|
20
|
+
|
|
21
|
+
# flags.domain.summary
|
|
22
|
+
|
|
23
|
+
Generate the domain layer and its trigger.
|
|
24
|
+
|
|
25
|
+
# flags.unit-of-work.summary
|
|
26
|
+
|
|
27
|
+
Generate the unit-of-work binding (at4dx) or print the Application entry to add (fflib).
|
|
28
|
+
|
|
29
|
+
# examples
|
|
30
|
+
|
|
31
|
+
- Generate all three AT4DX layers for Account:
|
|
32
|
+
|
|
33
|
+
<%= config.bin %> <%= command.id %> --target-org myOrg --sobject Account --flavor at4dx --selector --domain --unit-of-work
|
|
34
|
+
|
|
35
|
+
- Preview an fflib selector and domain with a class prefix, writing nothing:
|
|
36
|
+
|
|
37
|
+
<%= config.bin %> <%= command.id %> --target-org myOrg --sobject Property__c --flavor fflib --prefix acme --selector --domain --dry-run
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate a selector class, its interface and test, and its AT4DX binding for an SObject.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Describes --sobject in --target-org and scaffolds the selector into --output-dir: the implementation (selecting every filterable, non-textarea field), its interface, a unit test, and their -meta.xml files. With --flavor at4dx it also writes the ApplicationFactory_SelectorBinding record, using BindingSObject__c when EntityDefinition can reference the object and BindingSObjectAlternate__c when it can't.
|
|
8
|
+
|
|
9
|
+
The binding is checked against the project's package directories and --output-dir before anything is written; see `simply aep generate --help` for the --force and --overwrite rules.
|
|
10
|
+
|
|
11
|
+
# examples
|
|
12
|
+
|
|
13
|
+
- Generate an AT4DX selector for Account:
|
|
14
|
+
|
|
15
|
+
<%= config.bin %> <%= command.id %> --target-org myOrg --sobject Account --flavor at4dx
|
|
16
|
+
|
|
17
|
+
- Generate an fflib selector with a class prefix:
|
|
18
|
+
|
|
19
|
+
<%= config.bin %> <%= command.id %> --target-org myOrg --sobject Property__c --flavor fflib --prefix acme
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate a service facade, interface, implementation, exception, and test, and its AT4DX binding.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Scaffolds a service named from --service-basename into --output-dir — `--service-basename Billing` gives BillingService, IBillingService, BillingServiceImpl, BillingServiceException, and BillingServiceTest — with their -meta.xml files. With --flavor at4dx it also writes the ApplicationFactory_ServiceBinding record mapping the interface to the implementation.
|
|
8
|
+
|
|
9
|
+
A service isn't tied to an SObject, so nothing is described and no org is needed. The generated -meta.xml files declare --api-version, else the version of --target-org if one is given, else 60.0.
|
|
10
|
+
|
|
11
|
+
# flags.service-basename.summary
|
|
12
|
+
|
|
13
|
+
Base name for the generated classes, used as given (not pluralized).
|
|
14
|
+
|
|
15
|
+
# examples
|
|
16
|
+
|
|
17
|
+
- Generate an AT4DX service without an org:
|
|
18
|
+
|
|
19
|
+
<%= config.bin %> <%= command.id %> --service-basename LimitMonitors --flavor at4dx --api-version 62.0
|
|
20
|
+
|
|
21
|
+
- Generate an fflib service at a connected org's API version:
|
|
22
|
+
|
|
23
|
+
<%= config.bin %> <%= command.id %> --target-org myOrg --service-basename Billing --flavor fflib
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate an AT4DX unit-of-work binding for an SObject, or print the fflib Application entry to add.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
With --flavor at4dx, writes the ApplicationFactory_UnitOfWorkBinding record registering --sobject with the Unit of Work at --sequence. With --flavor fflib nothing is written, since fflib has no unit-of-work binding: the command prints the Application.UnitOfWorkFactory entry to add by hand, and returns it as manualSteps.
|
|
8
|
+
|
|
9
|
+
Two unit-of-work bindings can't share a sequence or an SObject, so a run that would introduce either fails validation unless you pass --force.
|
|
10
|
+
|
|
11
|
+
# flags.sequence.summary
|
|
12
|
+
|
|
13
|
+
BindingSequence__c: where the SObject falls in the commit order, lower first. Defaults to 1000.
|
|
14
|
+
|
|
15
|
+
# examples
|
|
16
|
+
|
|
17
|
+
- Register Account with the AT4DX Unit of Work:
|
|
18
|
+
|
|
19
|
+
<%= config.bin %> <%= command.id %> --target-org myOrg --sobject Account --flavor at4dx --sequence 1000
|
|
20
|
+
|
|
21
|
+
- Print the fflib Application entry for Account:
|
|
22
|
+
|
|
23
|
+
<%= config.bin %> <%= command.id %> --target-org myOrg --sobject Account --flavor fflib
|