currentactivity 1.0.1 → 1.0.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/README.md +3 -0
- package/build/index.js +6 -4
- package/package.json +1 -1
- package/src/index.ts +10 -4
package/README.md
CHANGED
package/build/index.js
CHANGED
|
@@ -136,9 +136,10 @@ function printAll() {
|
|
|
136
136
|
if (stackId != undefined) {
|
|
137
137
|
const stackLines = windowLines.filter((v) => {
|
|
138
138
|
const s = v.trim();
|
|
139
|
-
return s.startsWith("*")
|
|
139
|
+
return ((s.startsWith("*") || s.startsWith("Activity #")) &&
|
|
140
|
+
s.indexOf(stackId) > 0);
|
|
140
141
|
});
|
|
141
|
-
const stacks = stackLines.map((v) => v.trim().split(" ")
|
|
142
|
+
const stacks = stackLines.map((v) => v.trim().split(" ").last(1));
|
|
142
143
|
if (stacks[0] != currentActivity) {
|
|
143
144
|
stacks.shift();
|
|
144
145
|
}
|
|
@@ -417,9 +418,10 @@ function printCurrentActivityStack() {
|
|
|
417
418
|
if (stackId != undefined) {
|
|
418
419
|
const stackLines = windowLines.filter((v) => {
|
|
419
420
|
const s = v.trim();
|
|
420
|
-
return s.startsWith("*")
|
|
421
|
+
return ((s.startsWith("*") || s.startsWith("Activity #")) &&
|
|
422
|
+
s.indexOf(stackId) > 0);
|
|
421
423
|
});
|
|
422
|
-
const stacks = stackLines.map((v) => v.trim().split(" ")
|
|
424
|
+
const stacks = stackLines.map((v) => v.trim().split(" ").last(1));
|
|
423
425
|
if (stacks[0] != currentActivity) {
|
|
424
426
|
stacks.shift();
|
|
425
427
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -155,9 +155,12 @@ async function printAll() {
|
|
|
155
155
|
if (stackId != undefined) {
|
|
156
156
|
const stackLines = windowLines.filter((v) => {
|
|
157
157
|
const s = v.trim();
|
|
158
|
-
return
|
|
158
|
+
return (
|
|
159
|
+
(s.startsWith("*") || s.startsWith("Activity #")) &&
|
|
160
|
+
s.indexOf(stackId) > 0
|
|
161
|
+
);
|
|
159
162
|
});
|
|
160
|
-
const stacks = stackLines.map((v) => v.trim().split(" ")
|
|
163
|
+
const stacks = stackLines.map((v) => v.trim().split(" ").last(1));
|
|
161
164
|
if (stacks[0] != currentActivity) {
|
|
162
165
|
stacks.shift();
|
|
163
166
|
}
|
|
@@ -495,9 +498,12 @@ async function printCurrentActivityStack() {
|
|
|
495
498
|
if (stackId != undefined) {
|
|
496
499
|
const stackLines = windowLines.filter((v) => {
|
|
497
500
|
const s = v.trim();
|
|
498
|
-
return
|
|
501
|
+
return (
|
|
502
|
+
(s.startsWith("*") || s.startsWith("Activity #")) &&
|
|
503
|
+
s.indexOf(stackId) > 0
|
|
504
|
+
);
|
|
499
505
|
});
|
|
500
|
-
const stacks = stackLines.map((v) => v.trim().split(" ")
|
|
506
|
+
const stacks = stackLines.map((v) => v.trim().split(" ").last(1));
|
|
501
507
|
if (stacks[0] != currentActivity) {
|
|
502
508
|
stacks.shift();
|
|
503
509
|
}
|