wikiploy 2.1.0 → 2.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.
Files changed (2) hide show
  1. package/README.md +37 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,6 +14,43 @@ See also:
14
14
 
15
15
  ## New capabilities
16
16
 
17
+ ### setupSummary (v2.1)
18
+
19
+ A helper function that can replace your usages of `userPrompt`. It prompts a user and then supplies
20
+ The `setupSummary` function initializes a summary for a given bot. It requires a `Wikiploy` bot object and optionally takes a gadget version and a standard summary text.
21
+
22
+ #### Parameters
23
+
24
+ - `ployBot`: A `Wikiploy` bot object. This is required to setup the `summary()` function.
25
+ - `version` (optional): The version of your gadget. Defaults to an empty string if not provided.
26
+ - `standardSummary` (optional): A string that provides a standard summary aside from the version. Defaults to "changes from Github".
27
+
28
+ For a prompt answer: "fixed bug #123", you would get: "v5.6.0: fixed bug #123" (`v${version}: ${summary}`).
29
+
30
+ #### Usage
31
+
32
+ Basic usage:
33
+ ```js
34
+ // custom summary from a prompt
35
+ await setupSummary(ployBot);
36
+ ```
37
+
38
+ Version from package:
39
+ ```js
40
+ (async () => {
41
+ // custom summary from a prompt
42
+ let version = await readVersion('package.json');
43
+ await setupSummary(ployBot, version);
44
+
45
+ // [...]
46
+
47
+ await ployBot.deploy(configs);
48
+ })().catch(err => {
49
+ console.error(err);
50
+ process.exit(1);
51
+ });
52
+ ```
53
+
17
54
  ### Lightweight Dependencies (v2.0)
18
55
 
19
56
  We had a good run, but it's time to bid farewell to [Puppeteer](https://pptr.dev/) and free the puppets ;). Obviously, this might be a breaking change if you really need to use it. However, the Wikiploy API doesn't really change...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikiploy",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "User scripts and gadgets deployment for MediaWiki (Wikipedia).",
5
5
  "main": "src/index.js",
6
6
  "type": "module",