@j-schreiber/sf-cli-plugin-ci-template 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # @j-schreiber/sf-cli-plugin-ci-template
2
+
3
+ This is a demo / template repo to experiment with various CI workflows. It is not intended for production use.
4
+
5
+ # Documentation
6
+
7
+ <!-- commands -->
8
+
9
+ - [`sf hello-world`](#sf-hello-world)
10
+
11
+ ## `sf hello-world`
12
+
13
+ Summary of a command.
14
+
15
+ ```
16
+ USAGE
17
+ $ sf hello-world -o <value> [--json] [--flags-dir <value>]
18
+
19
+ FLAGS
20
+ -o, --target-org=<value> (required) The target org
21
+
22
+ GLOBAL FLAGS
23
+ --flags-dir=<value> Import flag values from a directory.
24
+ --json Format output as json.
25
+
26
+ DESCRIPTION
27
+ Summary of a command.
28
+
29
+ Description. Does not repeat summary.
30
+
31
+ EXAMPLES
32
+ Do something
33
+
34
+ $ sf hello-world -o MyTargetOrg
35
+ ```
36
+
37
+ _See code: [src/commands/hello-world.ts](https://github.com/j-schreiber/sf-cli-plugin-ci-template/blob/v0.1.0/src/commands/hello-world.ts)_
38
+
39
+ <!-- commandsstop -->
package/bin/dev.js ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
2
+ // eslint-disable-next-line node/shebang
3
+ async function main() {
4
+ const { execute } = await import('@oclif/core');
5
+ await execute({ development: true, dir: import.meta.url });
6
+ }
7
+
8
+ await main();
@@ -0,0 +1,13 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export type HelloWorldResult = {
3
+ message: string;
4
+ };
5
+ export default class HelloWorld extends SfCommand<HelloWorldResult> {
6
+ static readonly summary: string;
7
+ static readonly description: string;
8
+ static readonly examples: string[];
9
+ static readonly flags: {
10
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
11
+ };
12
+ run(): Promise<HelloWorldResult>;
13
+ }
@@ -0,0 +1,21 @@
1
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
2
+ import { Messages } from '@salesforce/core';
3
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
4
+ const messages = Messages.loadMessages('@j-schreiber/sf-cli-plugin-ci-template', 'hello-world');
5
+ export default class HelloWorld extends SfCommand {
6
+ static summary = messages.getMessage('summary');
7
+ static description = messages.getMessage('description');
8
+ static examples = messages.getMessages('examples');
9
+ static flags = {
10
+ 'target-org': Flags.requiredOrg({
11
+ summary: messages.getMessage('flags.target-org.summary'),
12
+ char: 'o',
13
+ required: true,
14
+ }),
15
+ };
16
+ async run() {
17
+ const { flags } = await this.parse(HelloWorld);
18
+ return { message: `Hello from ${flags['target-org'].getUsername()} ` };
19
+ }
20
+ }
21
+ //# sourceMappingURL=hello-world.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hello-world.js","sourceRoot":"","sources":["../../src/commands/hello-world.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wCAAwC,EAAE,aAAa,CAAC,CAAC;AAMhG,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAA2B;IAC1D,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC;YAC9B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;YACxD,IAAI,EAAE,GAAG;YACT,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC/C,OAAO,EAAE,OAAO,EAAE,cAAc,KAAK,CAAC,YAAY,CAAC,CAAC,WAAW,EAAG,GAAG,EAAE,CAAC;IAC1E,CAAC"}
@@ -0,0 +1,17 @@
1
+ # summary
2
+
3
+ Summary of a command.
4
+
5
+ # description
6
+
7
+ Description. Does not repeat summary.
8
+
9
+ # examples
10
+
11
+ - Do something
12
+
13
+ <%= config.bin %> <%= command.id %> -o MyTargetOrg
14
+
15
+ # flags.target-org.summary
16
+
17
+ The target org