@sfship/plugin-ship 1.0.0-beta.2
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.txt +206 -0
- package/README.md +164 -0
- package/lib/commands/ship/flow/eject.d.ts +15 -0
- package/lib/commands/ship/flow/eject.js +55 -0
- package/lib/commands/ship/flow/eject.js.map +1 -0
- package/lib/commands/ship/flow/info.d.ts +15 -0
- package/lib/commands/ship/flow/info.js +86 -0
- package/lib/commands/ship/flow/info.js.map +1 -0
- package/lib/commands/ship/flow/list.d.ts +12 -0
- package/lib/commands/ship/flow/list.js +51 -0
- package/lib/commands/ship/flow/list.js.map +1 -0
- package/lib/commands/ship/flow/run.d.ts +16 -0
- package/lib/commands/ship/flow/run.js +90 -0
- package/lib/commands/ship/flow/run.js.map +1 -0
- package/lib/commands/ship/project/init.d.ts +13 -0
- package/lib/commands/ship/project/init.js +81 -0
- package/lib/commands/ship/project/init.js.map +1 -0
- package/lib/commands/ship/service/connect/github.d.ts +12 -0
- package/lib/commands/ship/service/connect/github.js +47 -0
- package/lib/commands/ship/service/connect/github.js.map +1 -0
- package/lib/commands/ship/service/delete.d.ts +13 -0
- package/lib/commands/ship/service/delete.js +44 -0
- package/lib/commands/ship/service/delete.js.map +1 -0
- package/lib/commands/ship/service/info.d.ts +13 -0
- package/lib/commands/ship/service/info.js +51 -0
- package/lib/commands/ship/service/info.js.map +1 -0
- package/lib/commands/ship/service/list.d.ts +9 -0
- package/lib/commands/ship/service/list.js +55 -0
- package/lib/commands/ship/service/list.js.map +1 -0
- package/lib/commands/ship/task/info.d.ts +15 -0
- package/lib/commands/ship/task/info.js +75 -0
- package/lib/commands/ship/task/info.js.map +1 -0
- package/lib/commands/ship/task/list.d.ts +12 -0
- package/lib/commands/ship/task/list.js +45 -0
- package/lib/commands/ship/task/list.js.map +1 -0
- package/lib/commands/ship/task/run.d.ts +16 -0
- package/lib/commands/ship/task/run.js +72 -0
- package/lib/commands/ship/task/run.js.map +1 -0
- package/lib/core/config.dependency.schema.d.ts +24 -0
- package/lib/core/config.dependency.schema.js +34 -0
- package/lib/core/config.dependency.schema.js.map +1 -0
- package/lib/core/config.loader.d.ts +23 -0
- package/lib/core/config.loader.js +62 -0
- package/lib/core/config.loader.js.map +1 -0
- package/lib/core/config.ship.schema.d.ts +174 -0
- package/lib/core/config.ship.schema.js +67 -0
- package/lib/core/config.ship.schema.js.map +1 -0
- package/lib/core/error.d.ts +29 -0
- package/lib/core/error.js +59 -0
- package/lib/core/error.js.map +1 -0
- package/lib/core/file.d.ts +34 -0
- package/lib/core/file.js +123 -0
- package/lib/core/file.js.map +1 -0
- package/lib/core/flow.context.d.ts +22 -0
- package/lib/core/flow.context.js +4 -0
- package/lib/core/flow.context.js.map +1 -0
- package/lib/core/flow.definition.schema.d.ts +60 -0
- package/lib/core/flow.definition.schema.js +56 -0
- package/lib/core/flow.definition.schema.js.map +1 -0
- package/lib/core/flow.interpolate.d.ts +21 -0
- package/lib/core/flow.interpolate.js +64 -0
- package/lib/core/flow.interpolate.js.map +1 -0
- package/lib/core/flow.registry.d.ts +32 -0
- package/lib/core/flow.registry.js +99 -0
- package/lib/core/flow.registry.js.map +1 -0
- package/lib/core/flow.renderer.d.ts +51 -0
- package/lib/core/flow.renderer.js +137 -0
- package/lib/core/flow.renderer.js.map +1 -0
- package/lib/core/flow.runner.d.ts +13 -0
- package/lib/core/flow.runner.js +133 -0
- package/lib/core/flow.runner.js.map +1 -0
- package/lib/core/flow.store.d.ts +24 -0
- package/lib/core/flow.store.js +57 -0
- package/lib/core/flow.store.js.map +1 -0
- package/lib/core/flow.view.d.ts +20 -0
- package/lib/core/flow.view.js +77 -0
- package/lib/core/flow.view.js.map +1 -0
- package/lib/core/flows/create/package.yml +18 -0
- package/lib/core/flows/dependencies/lock.yml +4 -0
- package/lib/core/flows/deploy/beta.yml +38 -0
- package/lib/core/flows/deploy/dev.yml +26 -0
- package/lib/core/flows/deploy/feature.yml +56 -0
- package/lib/core/flows/deploy/qa.yml +51 -0
- package/lib/core/flows/deploy/regression.yml +60 -0
- package/lib/core/flows/deploy/release.yml +38 -0
- package/lib/core/flows/release/beta.yml +25 -0
- package/lib/core/flows/release/production.yml +16 -0
- package/lib/core/org.registry.d.ts +45 -0
- package/lib/core/org.registry.js +76 -0
- package/lib/core/org.registry.js.map +1 -0
- package/lib/core/org.scratch.schema.d.ts +44 -0
- package/lib/core/org.scratch.schema.js +62 -0
- package/lib/core/org.scratch.schema.js.map +1 -0
- package/lib/core/package.dependencies.d.ts +45 -0
- package/lib/core/package.dependencies.js +158 -0
- package/lib/core/package.dependencies.js.map +1 -0
- package/lib/core/package.installer.d.ts +13 -0
- package/lib/core/package.installer.js +60 -0
- package/lib/core/package.installer.js.map +1 -0
- package/lib/core/package.metadata.d.ts +6 -0
- package/lib/core/package.metadata.js +33 -0
- package/lib/core/package.metadata.js.map +1 -0
- package/lib/core/package.namespace.d.ts +10 -0
- package/lib/core/package.namespace.js +40 -0
- package/lib/core/package.namespace.js.map +1 -0
- package/lib/core/package.version.d.ts +42 -0
- package/lib/core/package.version.js +60 -0
- package/lib/core/package.version.js.map +1 -0
- package/lib/core/project.init.d.ts +11 -0
- package/lib/core/project.init.js +121 -0
- package/lib/core/project.init.js.map +1 -0
- package/lib/core/service.d.ts +45 -0
- package/lib/core/service.github.d.ts +98 -0
- package/lib/core/service.github.js +270 -0
- package/lib/core/service.github.js.map +1 -0
- package/lib/core/service.js +91 -0
- package/lib/core/service.js.map +1 -0
- package/lib/core/sfdx-project.d.ts +25 -0
- package/lib/core/sfdx-project.js +39 -0
- package/lib/core/sfdx-project.js.map +1 -0
- package/lib/core/stdout.d.ts +1 -0
- package/lib/core/stdout.js +27 -0
- package/lib/core/stdout.js.map +1 -0
- package/lib/core/task.definition.schema.d.ts +69 -0
- package/lib/core/task.definition.schema.js +33 -0
- package/lib/core/task.definition.schema.js.map +1 -0
- package/lib/core/task.output.d.ts +29 -0
- package/lib/core/task.output.js +39 -0
- package/lib/core/task.output.js.map +1 -0
- package/lib/core/task.param.d.ts +30 -0
- package/lib/core/task.param.js +141 -0
- package/lib/core/task.param.js.map +1 -0
- package/lib/core/task.param.schema.d.ts +22 -0
- package/lib/core/task.param.schema.js +26 -0
- package/lib/core/task.param.schema.js.map +1 -0
- package/lib/core/task.registry.d.ts +22 -0
- package/lib/core/task.registry.js +85 -0
- package/lib/core/task.registry.js.map +1 -0
- package/lib/core/task.view.d.ts +10 -0
- package/lib/core/task.view.js +25 -0
- package/lib/core/task.view.js.map +1 -0
- package/lib/core/tasks/apex/run/test.d.ts +25 -0
- package/lib/core/tasks/apex/run/test.js +85 -0
- package/lib/core/tasks/apex/run/test.js.map +1 -0
- package/lib/core/tasks/data/import/tree.d.ts +12 -0
- package/lib/core/tasks/data/import/tree.js +61 -0
- package/lib/core/tasks/data/import/tree.js.map +1 -0
- package/lib/core/tasks/git/release/create.d.ts +42 -0
- package/lib/core/tasks/git/release/create.js +197 -0
- package/lib/core/tasks/git/release/create.js.map +1 -0
- package/lib/core/tasks/git/release/fetch.d.ts +24 -0
- package/lib/core/tasks/git/release/fetch.js +93 -0
- package/lib/core/tasks/git/release/fetch.js.map +1 -0
- package/lib/core/tasks/git/repo/info.d.ts +12 -0
- package/lib/core/tasks/git/repo/info.js +47 -0
- package/lib/core/tasks/git/repo/info.js.map +1 -0
- package/lib/core/tasks/metadata/deploy.d.ts +12 -0
- package/lib/core/tasks/metadata/deploy.js +39 -0
- package/lib/core/tasks/metadata/deploy.js.map +1 -0
- package/lib/core/tasks/org/assign/permsets.d.ts +12 -0
- package/lib/core/tasks/org/assign/permsets.js +54 -0
- package/lib/core/tasks/org/assign/permsets.js.map +1 -0
- package/lib/core/tasks/org/create/scratch.d.ts +36 -0
- package/lib/core/tasks/org/create/scratch.js +127 -0
- package/lib/core/tasks/org/create/scratch.js.map +1 -0
- package/lib/core/tasks/org/delete/scratch.d.ts +12 -0
- package/lib/core/tasks/org/delete/scratch.js +10 -0
- package/lib/core/tasks/org/delete/scratch.js.map +1 -0
- package/lib/core/tasks/package/create.d.ts +36 -0
- package/lib/core/tasks/package/create.js +93 -0
- package/lib/core/tasks/package/create.js.map +1 -0
- package/lib/core/tasks/package/dependencies/lock.d.ts +6 -0
- package/lib/core/tasks/package/dependencies/lock.js +35 -0
- package/lib/core/tasks/package/dependencies/lock.js.map +1 -0
- package/lib/core/tasks/package/dependencies/verify.d.ts +6 -0
- package/lib/core/tasks/package/dependencies/verify.js +44 -0
- package/lib/core/tasks/package/dependencies/verify.js.map +1 -0
- package/lib/core/tasks/package/install/dependencies.d.ts +22 -0
- package/lib/core/tasks/package/install/dependencies.js +43 -0
- package/lib/core/tasks/package/install/dependencies.js.map +1 -0
- package/lib/core/tasks/package/install/index.d.ts +25 -0
- package/lib/core/tasks/package/install/index.js +37 -0
- package/lib/core/tasks/package/install/index.js.map +1 -0
- package/lib/core/tasks/package/version/create.d.ts +36 -0
- package/lib/core/tasks/package/version/create.js +133 -0
- package/lib/core/tasks/package/version/create.js.map +1 -0
- package/lib/core/tasks/package/version/promote.d.ts +30 -0
- package/lib/core/tasks/package/version/promote.js +79 -0
- package/lib/core/tasks/package/version/promote.js.map +1 -0
- package/lib/core/tasks/package/version/resolve-latest.d.ts +24 -0
- package/lib/core/tasks/package/version/resolve-latest.js +78 -0
- package/lib/core/tasks/package/version/resolve-latest.js.map +1 -0
- package/lib/core/tasks/package/version/resolve-next.d.ts +24 -0
- package/lib/core/tasks/package/version/resolve-next.js +49 -0
- package/lib/core/tasks/package/version/resolve-next.js.map +1 -0
- package/lib/core/tasks/project/deploy/start.d.ts +22 -0
- package/lib/core/tasks/project/deploy/start.js +117 -0
- package/lib/core/tasks/project/deploy/start.js.map +1 -0
- package/lib/core/tasks/project/reset/tracking.d.ts +25 -0
- package/lib/core/tasks/project/reset/tracking.js +32 -0
- package/lib/core/tasks/project/reset/tracking.js.map +1 -0
- package/lib/core/tasks/util/file/exists.d.ts +24 -0
- package/lib/core/tasks/util/file/exists.js +53 -0
- package/lib/core/tasks/util/file/exists.js.map +1 -0
- package/lib/core/tasks/util/file/find.d.ts +30 -0
- package/lib/core/tasks/util/file/find.js +70 -0
- package/lib/core/tasks/util/file/find.js.map +1 -0
- package/lib/core/tasks/util/log.d.ts +13 -0
- package/lib/core/tasks/util/log.js +10 -0
- package/lib/core/tasks/util/log.js.map +1 -0
- package/lib/core/templates/README.md +35 -0
- package/lib/core/tree.d.ts +7 -0
- package/lib/core/tree.js +42 -0
- package/lib/core/tree.js.map +1 -0
- package/messages/service.connect.github.md +16 -0
- package/messages/ship.flow.eject.md +21 -0
- package/messages/ship.flow.info.md +21 -0
- package/messages/ship.flow.list.md +15 -0
- package/messages/ship.flow.run.md +23 -0
- package/messages/ship.project.init.md +23 -0
- package/messages/ship.service.delete.md +19 -0
- package/messages/ship.service.info.md +19 -0
- package/messages/ship.service.list.md +11 -0
- package/messages/ship.task.info.md +25 -0
- package/messages/ship.task.list.md +15 -0
- package/messages/ship.task.run.md +29 -0
- package/oclif.lock +10313 -0
- package/oclif.manifest.json +707 -0
- package/package.json +254 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
Apache License Version 2.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Salesforce, Inc.
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Apache License
|
|
7
|
+
Version 2.0, January 2004
|
|
8
|
+
http://www.apache.org/licenses/
|
|
9
|
+
|
|
10
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
11
|
+
|
|
12
|
+
1. Definitions.
|
|
13
|
+
|
|
14
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
15
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
16
|
+
|
|
17
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
18
|
+
the copyright owner that is granting the License.
|
|
19
|
+
|
|
20
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
21
|
+
other entities that control, are controlled by, or are under common
|
|
22
|
+
control with that entity. For the purposes of this definition,
|
|
23
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
24
|
+
direction or management of such entity, whether by contract or
|
|
25
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
26
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
27
|
+
|
|
28
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
29
|
+
exercising permissions granted by this License.
|
|
30
|
+
|
|
31
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
32
|
+
including but not limited to software source code, documentation
|
|
33
|
+
source, and configuration files.
|
|
34
|
+
|
|
35
|
+
"Object" form shall mean any form resulting from mechanical
|
|
36
|
+
transformation or translation of a Source form, including but
|
|
37
|
+
not limited to compiled object code, generated documentation,
|
|
38
|
+
and conversions to other media types.
|
|
39
|
+
|
|
40
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
41
|
+
Object form, made available under the License, as indicated by a
|
|
42
|
+
copyright notice that is included in or attached to the work
|
|
43
|
+
(an example is provided in the Appendix below).
|
|
44
|
+
|
|
45
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
46
|
+
form, that is based on (or derived from) the Work and for which the
|
|
47
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
48
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
49
|
+
of this License, Derivative Works shall not include works that remain
|
|
50
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
51
|
+
the Work and Derivative Works thereof.
|
|
52
|
+
|
|
53
|
+
"Contribution" shall mean any work of authorship, including
|
|
54
|
+
the original version of the Work and any modifications or additions
|
|
55
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
56
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
57
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
58
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
59
|
+
means any form of electronic, verbal, or written communication sent
|
|
60
|
+
to the Licensor or its representatives, including but not limited to
|
|
61
|
+
communication on electronic mailing lists, source code control systems,
|
|
62
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
63
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
64
|
+
excluding communication that is conspicuously marked or otherwise
|
|
65
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
66
|
+
|
|
67
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
68
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
69
|
+
subsequently incorporated within the Work.
|
|
70
|
+
|
|
71
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
72
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
73
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
74
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
75
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
76
|
+
Work and such Derivative Works in Source or Object form.
|
|
77
|
+
|
|
78
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
79
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
80
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
81
|
+
(except as stated in this section) patent license to make, have made,
|
|
82
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
83
|
+
where such license applies only to those patent claims licensable
|
|
84
|
+
by such Contributor that are necessarily infringed by their
|
|
85
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
86
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
87
|
+
institute patent litigation against any entity (including a
|
|
88
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
89
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
90
|
+
or contributory patent infringement, then any patent licenses
|
|
91
|
+
granted to You under this License for that Work shall terminate
|
|
92
|
+
as of the date such litigation is filed.
|
|
93
|
+
|
|
94
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
95
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
96
|
+
modifications, and in Source or Object form, provided that You
|
|
97
|
+
meet the following conditions:
|
|
98
|
+
|
|
99
|
+
(a) You must give any other recipients of the Work or
|
|
100
|
+
Derivative Works a copy of this License; and
|
|
101
|
+
|
|
102
|
+
(b) You must cause any modified files to carry prominent notices
|
|
103
|
+
stating that You changed the files; and
|
|
104
|
+
|
|
105
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
106
|
+
that You distribute, all copyright, patent, trademark, and
|
|
107
|
+
attribution notices from the Source form of the Work,
|
|
108
|
+
excluding those notices that do not pertain to any part of
|
|
109
|
+
the Derivative Works; and
|
|
110
|
+
|
|
111
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
112
|
+
distribution, then any Derivative Works that You distribute must
|
|
113
|
+
include a readable copy of the attribution notices contained
|
|
114
|
+
within such NOTICE file, excluding those notices that do not
|
|
115
|
+
pertain to any part of the Derivative Works, in at least one
|
|
116
|
+
of the following places: within a NOTICE text file distributed
|
|
117
|
+
as part of the Derivative Works; within the Source form or
|
|
118
|
+
documentation, if provided along with the Derivative Works; or,
|
|
119
|
+
within a display generated by the Derivative Works, if and
|
|
120
|
+
wherever such third-party notices normally appear. The contents
|
|
121
|
+
of the NOTICE file are for informational purposes only and
|
|
122
|
+
do not modify the License. You may add Your own attribution
|
|
123
|
+
notices within Derivative Works that You distribute, alongside
|
|
124
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
125
|
+
that such additional attribution notices cannot be construed
|
|
126
|
+
as modifying the License.
|
|
127
|
+
|
|
128
|
+
You may add Your own copyright statement to Your modifications and
|
|
129
|
+
may provide additional or different license terms and conditions
|
|
130
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
131
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
132
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
133
|
+
the conditions stated in this License.
|
|
134
|
+
|
|
135
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
136
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
137
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
138
|
+
this License, without any additional terms or conditions.
|
|
139
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
140
|
+
the terms of any separate license agreement you may have executed
|
|
141
|
+
with Licensor regarding such Contributions.
|
|
142
|
+
|
|
143
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
144
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
145
|
+
except as required for reasonable and customary use in describing the
|
|
146
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
147
|
+
|
|
148
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
149
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
150
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
151
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
152
|
+
implied, including, without limitation, any warranties or conditions
|
|
153
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
154
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
155
|
+
appropriateness of using or redistributing the Work and assume any
|
|
156
|
+
risks associated with Your exercise of permissions under this License.
|
|
157
|
+
|
|
158
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
159
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
160
|
+
unless required by applicable law (such as deliberate and grossly
|
|
161
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
162
|
+
liable to You for damages, including any direct, indirect, special,
|
|
163
|
+
incidental, or consequential damages of any character arising as a
|
|
164
|
+
result of this License or out of the use or inability to use the
|
|
165
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
166
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
167
|
+
other commercial damages or losses), even if such Contributor
|
|
168
|
+
has been advised of the possibility of such damages.
|
|
169
|
+
|
|
170
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
171
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
172
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
173
|
+
or other liability obligations and/or rights consistent with this
|
|
174
|
+
License. However, in accepting such obligations, You may act only
|
|
175
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
176
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
177
|
+
defend, and hold each Contributor harmless for any liability
|
|
178
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
179
|
+
of your accepting any such warranty or additional liability.
|
|
180
|
+
|
|
181
|
+
END OF TERMS AND CONDITIONS
|
|
182
|
+
|
|
183
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
184
|
+
|
|
185
|
+
To apply the Apache License to your work, attach the following
|
|
186
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
187
|
+
replaced with your own identifying information. (Don't include
|
|
188
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
189
|
+
comment syntax for the file format. We also recommend that a
|
|
190
|
+
file or class name and description of purpose be included on the
|
|
191
|
+
same "printed page" as the copyright notice for easier
|
|
192
|
+
identification within third-party archives.
|
|
193
|
+
|
|
194
|
+
Copyright {yyyy} {name of copyright owner}
|
|
195
|
+
|
|
196
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
197
|
+
you may not use this file except in compliance with the License.
|
|
198
|
+
You may obtain a copy of the License at
|
|
199
|
+
|
|
200
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
201
|
+
|
|
202
|
+
Unless required by applicable law or agreed to in writing, software
|
|
203
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
204
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
205
|
+
See the License for the specific language governing permissions and
|
|
206
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# plugin-ship
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/plugin-ship) [](https://opensource.org/license/apache-2-0)
|
|
4
|
+
|
|
5
|
+
A Salesforce CLI plugin for managing the full development and release lifecycle of second-generation managed and unlocked packages.
|
|
6
|
+
|
|
7
|
+
Flows and tasks are defined in a `ship.yml` config file. Flows are sequences of tasks that can pass data between steps. Tasks can also be run individually outside of a flow.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
sf plugins install plugin-ship
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Setup
|
|
16
|
+
|
|
17
|
+
Connect your GitHub account before using tasks that interact with GitHub:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
sf ship service connect github
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Commands
|
|
24
|
+
|
|
25
|
+
- [`sf ship flow list`](#sf-ship-flow-list)
|
|
26
|
+
- [`sf ship flow info <name>`](#sf-ship-flow-info)
|
|
27
|
+
- [`sf ship flow run <name>`](#sf-ship-flow-run)
|
|
28
|
+
- [`sf ship task list`](#sf-ship-task-list)
|
|
29
|
+
- [`sf ship task info <name>`](#sf-ship-task-info)
|
|
30
|
+
- [`sf ship task run <name>`](#sf-ship-task-run)
|
|
31
|
+
- [`sf ship service connect github`](#sf-ship-service-connect-github)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### `sf ship flow list`
|
|
36
|
+
|
|
37
|
+
Lists all flows defined in `ship.yml`.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
USAGE
|
|
41
|
+
$ sf ship flow list [--config <value>]
|
|
42
|
+
|
|
43
|
+
FLAGS
|
|
44
|
+
--config=<value> [default: ship.yml] Path to the ship config file.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### `sf ship flow info`
|
|
48
|
+
|
|
49
|
+
Shows description, params, and steps for a flow.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
USAGE
|
|
53
|
+
$ sf ship flow info <name> [--config <value>]
|
|
54
|
+
|
|
55
|
+
ARGUMENTS
|
|
56
|
+
NAME Name of the flow.
|
|
57
|
+
|
|
58
|
+
FLAGS
|
|
59
|
+
--config=<value> [default: ship.yml] Path to the ship config file.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### `sf ship flow run`
|
|
63
|
+
|
|
64
|
+
Runs a named flow defined in `ship.yml`.
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
USAGE
|
|
68
|
+
$ sf ship flow run <name> [--config <value>] [--param <value>...]
|
|
69
|
+
|
|
70
|
+
ARGUMENTS
|
|
71
|
+
NAME Name of the flow to run.
|
|
72
|
+
|
|
73
|
+
FLAGS
|
|
74
|
+
--config=<value> [default: ship.yml] Path to the ship config file.
|
|
75
|
+
--param=<value> Flow param in key=value format. May be specified multiple times.
|
|
76
|
+
|
|
77
|
+
EXAMPLES
|
|
78
|
+
$ sf ship flow run release --param version=1.2.0
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### `sf ship task list`
|
|
82
|
+
|
|
83
|
+
Lists all available tasks — built-in and any custom tasks in `.ship/tasks/`.
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
USAGE
|
|
87
|
+
$ sf ship task list [--config <value>]
|
|
88
|
+
|
|
89
|
+
FLAGS
|
|
90
|
+
--config=<value> [default: ship.yml] Path to the ship config file.
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### `sf ship task info`
|
|
94
|
+
|
|
95
|
+
Shows description and param schema for a task.
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
USAGE
|
|
99
|
+
$ sf ship task info <name> [--config <value>]
|
|
100
|
+
|
|
101
|
+
ARGUMENTS
|
|
102
|
+
NAME Name of the task.
|
|
103
|
+
|
|
104
|
+
FLAGS
|
|
105
|
+
--config=<value> [default: ship.yml] Path to the ship config file.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### `sf ship task run`
|
|
109
|
+
|
|
110
|
+
Runs a single task directly, outside of a flow.
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
USAGE
|
|
114
|
+
$ sf ship task run <name> [--config <value>] [--param <value>...]
|
|
115
|
+
|
|
116
|
+
ARGUMENTS
|
|
117
|
+
NAME Name of the task to run.
|
|
118
|
+
|
|
119
|
+
FLAGS
|
|
120
|
+
--config=<value> [default: ship.yml] Path to the ship config file.
|
|
121
|
+
--param=<value> Task param in key=value format. May be specified multiple times.
|
|
122
|
+
|
|
123
|
+
EXAMPLES
|
|
124
|
+
$ sf ship task run deploy-metadata --param targetOrg=myOrg
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### `sf ship service connect github`
|
|
128
|
+
|
|
129
|
+
Connects a GitHub account via OAuth device flow.
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
USAGE
|
|
133
|
+
$ sf ship service connect github [--alias <value>]
|
|
134
|
+
|
|
135
|
+
FLAGS
|
|
136
|
+
--alias=<value> [default: default] Alias to store the connection under.
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Local Development
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Install dependencies and compile
|
|
143
|
+
yarn && yarn build
|
|
144
|
+
|
|
145
|
+
# Link to the SF CLI for local testing
|
|
146
|
+
sf plugins link .
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Commit Types
|
|
150
|
+
|
|
151
|
+
When making a commit, the format `{type}: my lowercase message` is enforced.
|
|
152
|
+
|
|
153
|
+
| Type | Description |
|
|
154
|
+
| ---------- | ---------------------------------------------- |
|
|
155
|
+
| `feat` | New feature |
|
|
156
|
+
| `fix` | Bug fix |
|
|
157
|
+
| `chore` | Maintenance (deps, config, tooling) |
|
|
158
|
+
| `refactor` | Code change that's neither a fix nor a feature |
|
|
159
|
+
| `test` | Adding or updating tests |
|
|
160
|
+
| `docs` | Documentation only |
|
|
161
|
+
| `ci` | CI/CD config changes |
|
|
162
|
+
| `build` | Changes to the build system |
|
|
163
|
+
| `perf` | Performance improvement |
|
|
164
|
+
| `style` | Formatting, whitespace (no logic change) |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
/** Copies a built-in flow into the project for customization. */
|
|
3
|
+
export default class FlowEject extends SfCommand<void> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly args: {
|
|
8
|
+
flowName: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
static readonly enableJsonFlag = false;
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
* you may not use this file except in compliance with the License.
|
|
4
|
+
* You may obtain a copy of the License at
|
|
5
|
+
*
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
*
|
|
8
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
* See the License for the specific language governing permissions and
|
|
12
|
+
* limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
import { existsSync, copyFileSync, mkdirSync } from 'node:fs';
|
|
15
|
+
import { dirname, join, relative } from 'node:path';
|
|
16
|
+
import { Args } from '@oclif/core';
|
|
17
|
+
import { SfCommand, Flags, StandardColors } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { Messages } from '@salesforce/core';
|
|
19
|
+
import { loadConfig, resolveProjectPaths } from '../../../core/config.loader.js';
|
|
20
|
+
import { FlowRegistry, builtinsDir } from '../../../core/flow.registry.js';
|
|
21
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
22
|
+
const messages = Messages.loadMessages('@sfship/plugin-ship', 'ship.flow.eject');
|
|
23
|
+
/** Copies a built-in flow into the project for customization. */
|
|
24
|
+
export default class FlowEject extends SfCommand {
|
|
25
|
+
static summary = messages.getMessage('summary');
|
|
26
|
+
static description = messages.getMessage('description');
|
|
27
|
+
static examples = messages.getMessages('examples');
|
|
28
|
+
static args = {
|
|
29
|
+
flowName: Args.string({ description: messages.getMessage('args.flowName.summary'), required: true }),
|
|
30
|
+
};
|
|
31
|
+
static flags = {
|
|
32
|
+
config: Flags.file({ default: 'ship.yml', summary: messages.getMessage('flags.config.summary') }),
|
|
33
|
+
};
|
|
34
|
+
static enableJsonFlag = false;
|
|
35
|
+
async run() {
|
|
36
|
+
const { args, flags } = await this.parse(FlowEject);
|
|
37
|
+
this.log('');
|
|
38
|
+
this.styledHeader('Flow Eject');
|
|
39
|
+
const config = loadConfig(flags.config);
|
|
40
|
+
const { shipDir } = resolveProjectPaths(flags.config, config);
|
|
41
|
+
const src = new FlowRegistry(shipDir).builtinSource(args.flowName);
|
|
42
|
+
if (!src) {
|
|
43
|
+
this.error(`"${args.flowName}" is not a built-in flow.`, { exit: 1 });
|
|
44
|
+
}
|
|
45
|
+
const dest = join(shipDir, 'flows', relative(builtinsDir, src));
|
|
46
|
+
if (existsSync(dest)) {
|
|
47
|
+
this.error(`${dest} already exists. Remove it first if you want to re-eject.`, { exit: 1 });
|
|
48
|
+
}
|
|
49
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
50
|
+
copyFileSync(src, dest);
|
|
51
|
+
this.log(StandardColors.success('✓') + ` Ejected flow to: ${dest}`);
|
|
52
|
+
this.log('');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=eject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eject.js","sourceRoot":"","sources":["../../../../src/commands/ship/flow/eject.ts"],"names":[],"mapp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AI,EAAE,CAAC,CAAC;QACpE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACf,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
/** Shows description, params, and steps for a flow. */
|
|
3
|
+
export default class FlowInfo extends SfCommand<void> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly args: {
|
|
8
|
+
flowName: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
static readonly enableJsonFlag = false;
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
* you may not use this file except in compliance with the License.
|
|
4
|
+
* You may obtain a copy of the License at
|
|
5
|
+
*
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
*
|
|
8
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
* See the License for the specific language governing permissions and
|
|
12
|
+
* limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
import { Args } from '@oclif/core';
|
|
15
|
+
import { SfCommand, Flags, Ux, StandardColors } from '@salesforce/sf-plugins-core';
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { loadConfig, resolveProjectPaths } from '../../../core/config.loader.js';
|
|
18
|
+
import { FlowRegistry } from '../../../core/flow.registry.js';
|
|
19
|
+
import { asError } from '../../../core/error.js';
|
|
20
|
+
import { formatFlowPreview } from '../../../core/flow.view.js';
|
|
21
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
22
|
+
const messages = Messages.loadMessages('@sfship/plugin-ship', 'ship.flow.info');
|
|
23
|
+
/** Shows description, params, and steps for a flow. */
|
|
24
|
+
export default class FlowInfo extends SfCommand {
|
|
25
|
+
static summary = messages.getMessage('summary');
|
|
26
|
+
static description = messages.getMessage('description');
|
|
27
|
+
static examples = messages.getMessages('examples');
|
|
28
|
+
static args = {
|
|
29
|
+
flowName: Args.string({ description: messages.getMessage('args.flowName.summary'), required: true }),
|
|
30
|
+
};
|
|
31
|
+
static flags = {
|
|
32
|
+
config: Flags.file({ default: 'ship.yml', summary: messages.getMessage('flags.config.summary') }),
|
|
33
|
+
};
|
|
34
|
+
static enableJsonFlag = false;
|
|
35
|
+
async run() {
|
|
36
|
+
const { args, flags } = await this.parse(FlowInfo);
|
|
37
|
+
this.log('');
|
|
38
|
+
this.styledHeader('Flow Info');
|
|
39
|
+
const config = loadConfig(flags.config);
|
|
40
|
+
const { shipDir } = resolveProjectPaths(flags.config, config);
|
|
41
|
+
const registry = new FlowRegistry(shipDir);
|
|
42
|
+
let flow;
|
|
43
|
+
try {
|
|
44
|
+
flow = registry.resolveFlow(args.flowName);
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
this.error(asError(err).message, { exit: 1 });
|
|
48
|
+
}
|
|
49
|
+
const ux = new Ux();
|
|
50
|
+
this.log(formatFlowPreview(args.flowName, flow.description));
|
|
51
|
+
this.log('');
|
|
52
|
+
if (flow.params && flow.params.length > 0) {
|
|
53
|
+
this.styledHeader('Params');
|
|
54
|
+
ux.table({
|
|
55
|
+
data: flow.params.map((p) => ({
|
|
56
|
+
name: p.name,
|
|
57
|
+
type: p.type,
|
|
58
|
+
required: p.required ? 'yes' : 'no',
|
|
59
|
+
default: p.default ?? '—',
|
|
60
|
+
description: p.description ?? '—',
|
|
61
|
+
})),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
this.styledHeader('Flow Steps');
|
|
65
|
+
ux.table({
|
|
66
|
+
data: Object.entries(flow.steps).map(([stepId, step], index) => ({
|
|
67
|
+
'#': index + 1,
|
|
68
|
+
id: stepId,
|
|
69
|
+
task: step.task,
|
|
70
|
+
params: step.params
|
|
71
|
+
? Object.entries(step.params)
|
|
72
|
+
.map(([k, v]) => `${k}=${String(v)}`)
|
|
73
|
+
.join(', ')
|
|
74
|
+
: '—',
|
|
75
|
+
})),
|
|
76
|
+
});
|
|
77
|
+
const requiredParams = (flow.params ?? [])
|
|
78
|
+
.filter((p) => p.required)
|
|
79
|
+
.map((p) => `--param ${p.name}=<${p.name}>`)
|
|
80
|
+
.join(' ');
|
|
81
|
+
const exampleCmd = [`sf ship flow run ${args.flowName}`, requiredParams].filter(Boolean).join(' ');
|
|
82
|
+
this.log(StandardColors.info('Tip:') + ' Run ' + StandardColors.success(exampleCmd) + ' to execute this flow.');
|
|
83
|
+
this.log('');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../../src/commands/ship/flow/info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,C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ommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
/** Lists all flows defined in ship.yml. */
|
|
3
|
+
export default class FlowList extends SfCommand<void> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly flags: {
|
|
8
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
static readonly enableJsonFlag = false;
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
* you may not use this file except in compliance with the License.
|
|
4
|
+
* You may obtain a copy of the License at
|
|
5
|
+
*
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
*
|
|
8
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
* See the License for the specific language governing permissions and
|
|
12
|
+
* limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
import { SfCommand, Flags, StandardColors } from '@salesforce/sf-plugins-core';
|
|
15
|
+
import { Messages } from '@salesforce/core';
|
|
16
|
+
import { loadConfig, resolveProjectPaths } from '../../../core/config.loader.js';
|
|
17
|
+
import { FlowRegistry } from '../../../core/flow.registry.js';
|
|
18
|
+
import { renderTree } from '../../../core/tree.js';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@sfship/plugin-ship', 'ship.flow.list');
|
|
21
|
+
/** Lists all flows defined in ship.yml. */
|
|
22
|
+
export default class FlowList extends SfCommand {
|
|
23
|
+
static summary = messages.getMessage('summary');
|
|
24
|
+
static description = messages.getMessage('description');
|
|
25
|
+
static examples = messages.getMessages('examples');
|
|
26
|
+
static flags = {
|
|
27
|
+
config: Flags.file({ default: 'ship.yml', summary: messages.getMessage('flags.config.summary') }),
|
|
28
|
+
};
|
|
29
|
+
static enableJsonFlag = false;
|
|
30
|
+
async run() {
|
|
31
|
+
const { flags } = await this.parse(FlowList);
|
|
32
|
+
const config = loadConfig(flags.config);
|
|
33
|
+
const { shipDir } = resolveProjectPaths(flags.config, config);
|
|
34
|
+
const registry = new FlowRegistry(shipDir);
|
|
35
|
+
const names = registry.list();
|
|
36
|
+
this.log('');
|
|
37
|
+
this.styledHeader('Flow List');
|
|
38
|
+
if (names.length === 0) {
|
|
39
|
+
this.log('No flows available.');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
this.log(renderTree(names));
|
|
43
|
+
this.log('');
|
|
44
|
+
this.log(StandardColors.info('Tip:') +
|
|
45
|
+
' Run ' +
|
|
46
|
+
StandardColors.success('sf ship flow info <path>') +
|
|
47
|
+
' to see full details for a flow.');
|
|
48
|
+
this.log('');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/ship/flow/list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QA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AC,CAAC,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,IAAI,CAAC,GAAG,CACN,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC;YACzB,OAAO;YACP,cAAc,CAAC,OAAO,CAAC,0BAA0B,CAAC;YAClD,kCAAkC,CACrC,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACf,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
/** Executes a built-in flow or one defined in `ship.yml`. */
|
|
3
|
+
export default class FlowRun extends SfCommand<void> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly args: {
|
|
8
|
+
flowName: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
param: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
static readonly enableJsonFlag = false;
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|