pm-skill 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/dist/workflows.js +29 -11
- package/package.json +1 -1
package/dist/workflows.js
CHANGED
|
@@ -170,18 +170,29 @@ async function setup(ctx, args) {
|
|
|
170
170
|
else {
|
|
171
171
|
console.log("\nβ
All config labels matched.");
|
|
172
172
|
}
|
|
173
|
-
// 6.
|
|
174
|
-
console.log("\n
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
173
|
+
// 6. Notion connection check
|
|
174
|
+
console.log("\nπ Notion:");
|
|
175
|
+
if (ctx.env.NOTION_API_KEY) {
|
|
176
|
+
try {
|
|
177
|
+
const notionInfo = await validateNotionKey(ctx.env.NOTION_API_KEY);
|
|
178
|
+
console.log(` β
Connected: ${notionInfo.name}`);
|
|
179
|
+
if (ctx.env.NOTION_ROOT_PAGE_ID) {
|
|
180
|
+
console.log(` Root page: ${ctx.env.NOTION_ROOT_PAGE_ID}`);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
console.log(` β οΈ NOTION_ROOT_PAGE_ID not set β page creation will be skipped`);
|
|
184
|
+
}
|
|
185
|
+
if (ctx.env.NOTION_BUG_DB_ID) {
|
|
186
|
+
console.log(` Bug DB: ${ctx.env.NOTION_BUG_DB_ID}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
catch {
|
|
190
|
+
console.log(" β Notion API key is invalid. Check https://www.notion.so/my-integrations");
|
|
191
|
+
}
|
|
179
192
|
}
|
|
180
193
|
else {
|
|
181
|
-
console.log("
|
|
182
|
-
|
|
183
|
-
if (!ctx.env.NOTION_API_KEY) {
|
|
184
|
-
console.log(" NOTION_API_KEY=<get from https://www.notion.so/my-integrations>");
|
|
194
|
+
console.log(" β οΈ NOTION_API_KEY not set β Notion features disabled");
|
|
195
|
+
console.log(" Set it via: pm-skill init --notion-key <key> --global");
|
|
185
196
|
}
|
|
186
197
|
}
|
|
187
198
|
async function startFeature(ctx, args) {
|
|
@@ -373,9 +384,16 @@ const COMMANDS = {
|
|
|
373
384
|
async function main() {
|
|
374
385
|
const args = minimist(process.argv.slice(2), {
|
|
375
386
|
string: ["severity", "type", "url", "title", "linear-key", "notion-key", "team-id", "project-id", "notion-page"],
|
|
376
|
-
boolean: ["global", "sync"],
|
|
387
|
+
boolean: ["global", "sync", "version"],
|
|
377
388
|
alias: { s: "severity", t: "type" },
|
|
378
389
|
});
|
|
390
|
+
// --version
|
|
391
|
+
if (args.version) {
|
|
392
|
+
const { readFileSync } = await import("fs");
|
|
393
|
+
const pkg = JSON.parse(readFileSync(resolve(PKG_ROOT, "package.json"), "utf-8"));
|
|
394
|
+
console.log(`pm-skill v${pkg.version}`);
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
379
397
|
const command = args._[0];
|
|
380
398
|
args._ = args._.slice(1); // command μ κ±°, λλ¨Έμ§κ° positional args
|
|
381
399
|
if (!command || command === "help") {
|