@knpkv/jira-cli 0.3.0 → 1.1.0
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/CHANGELOG.md +38 -0
- package/README.md +24 -9
- package/dist/JiraAuth.d.ts +9 -1
- package/dist/JiraAuth.d.ts.map +1 -1
- package/dist/JiraAuth.js +26 -8
- package/dist/JiraAuth.js.map +1 -1
- package/dist/JiraCliError.d.ts +30 -0
- package/dist/JiraCliError.d.ts.map +1 -1
- package/dist/JiraCliError.js +14 -0
- package/dist/JiraCliError.js.map +1 -1
- package/dist/SyncWorkspace.d.ts +34 -0
- package/dist/SyncWorkspace.d.ts.map +1 -0
- package/dist/SyncWorkspace.js +105 -0
- package/dist/SyncWorkspace.js.map +1 -0
- package/dist/bin.js +4 -5
- package/dist/bin.js.map +1 -1
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +49 -5
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/get.d.ts.map +1 -1
- package/dist/commands/get.js +2 -2
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/index.d.ts +1 -2
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +1 -2
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/issue.d.ts +8 -0
- package/dist/commands/issue.d.ts.map +1 -0
- package/dist/commands/issue.js +10 -0
- package/dist/commands/issue.js.map +1 -0
- package/dist/commands/layers.d.ts.map +1 -1
- package/dist/commands/layers.js +8 -1
- package/dist/commands/layers.js.map +1 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +4 -4
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/version.js +13 -13
- package/dist/commands/version.js.map +1 -1
- package/dist/internal/frontmatter.d.ts.map +1 -1
- package/dist/internal/frontmatter.js +14 -1
- package/dist/internal/frontmatter.js.map +1 -1
- package/dist/internal/sync/baseline.d.ts +11 -0
- package/dist/internal/sync/baseline.d.ts.map +1 -0
- package/dist/internal/sync/baseline.js +18 -0
- package/dist/internal/sync/baseline.js.map +1 -0
- package/dist/internal/sync/changes.d.ts +15 -0
- package/dist/internal/sync/changes.d.ts.map +1 -0
- package/dist/internal/sync/changes.js +72 -0
- package/dist/internal/sync/changes.js.map +1 -0
- package/dist/internal/sync/config.d.ts +12 -0
- package/dist/internal/sync/config.d.ts.map +1 -0
- package/dist/internal/sync/config.js +53 -0
- package/dist/internal/sync/config.js.map +1 -0
- package/dist/internal/sync/document.d.ts +9 -0
- package/dist/internal/sync/document.d.ts.map +1 -0
- package/dist/internal/sync/document.js +173 -0
- package/dist/internal/sync/document.js.map +1 -0
- package/dist/internal/sync/fieldValues.d.ts +30 -0
- package/dist/internal/sync/fieldValues.d.ts.map +1 -0
- package/dist/internal/sync/fieldValues.js +91 -0
- package/dist/internal/sync/fieldValues.js.map +1 -0
- package/dist/internal/sync/manifest.d.ts +12 -0
- package/dist/internal/sync/manifest.d.ts.map +1 -0
- package/dist/internal/sync/manifest.js +23 -0
- package/dist/internal/sync/manifest.js.map +1 -0
- package/dist/internal/sync/paths.d.ts +26 -0
- package/dist/internal/sync/paths.d.ts.map +1 -0
- package/dist/internal/sync/paths.js +22 -0
- package/dist/internal/sync/paths.js.map +1 -0
- package/dist/internal/sync/schemas.d.ts +128 -0
- package/dist/internal/sync/schemas.d.ts.map +1 -0
- package/dist/internal/sync/schemas.js +82 -0
- package/dist/internal/sync/schemas.js.map +1 -0
- package/dist/internal/sync/types.d.ts +144 -0
- package/dist/internal/sync/types.d.ts.map +1 -0
- package/dist/internal/sync/types.js +17 -0
- package/dist/internal/sync/types.js.map +1 -0
- package/package.json +7 -4
- package/skills/jira/SKILL.md +25 -13
- package/src/JiraAuth.ts +74 -14
- package/src/JiraCliError.ts +24 -0
- package/src/SyncWorkspace.ts +185 -0
- package/src/bin.ts +4 -6
- package/src/commands/auth.ts +59 -5
- package/src/commands/get.ts +2 -2
- package/src/commands/index.ts +1 -2
- package/src/commands/issue.ts +13 -0
- package/src/commands/layers.ts +8 -1
- package/src/commands/search.ts +4 -4
- package/src/commands/version.ts +15 -15
- package/src/internal/frontmatter.ts +15 -1
- package/src/internal/sync/baseline.ts +27 -0
- package/src/internal/sync/changes.ts +118 -0
- package/src/internal/sync/config.ts +76 -0
- package/src/internal/sync/document.ts +201 -0
- package/src/internal/sync/fieldValues.ts +145 -0
- package/src/internal/sync/manifest.ts +32 -0
- package/src/internal/sync/paths.ts +48 -0
- package/src/internal/sync/schemas.ts +103 -0
- package/src/internal/sync/types.ts +192 -0
- package/test/SyncWorkspace.test.ts +76 -0
- package/test/commandTree.test.ts +266 -0
- package/test/frontmatter.test.ts +69 -0
- package/test/integration.test.ts +187 -0
- package/test/syncChanges.test.ts +106 -0
- package/test/syncConfig.test.ts +138 -0
- package/test/syncDocument.test.ts +69 -0
- package/test/syncFieldValues.test.ts +101 -0
- package/vitest.config.integration.ts +17 -0
- package/vitest.config.ts +1 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
export declare const FieldShapeSchema: Schema.Literals<readonly ["text", "multilineText", "number", "boolean", "date", "singleSelect", "multiSelect", "user", "cascadingSelect"]>;
|
|
3
|
+
export declare const RequestedCustomFieldSchema: Schema.Struct<{
|
|
4
|
+
readonly displayName: Schema.String;
|
|
5
|
+
readonly fieldId: Schema.optional<Schema.String>;
|
|
6
|
+
readonly shape: Schema.Literals<readonly ["text", "multilineText", "number", "boolean", "date", "singleSelect", "multiSelect", "user", "cascadingSelect"]>;
|
|
7
|
+
readonly ordered: Schema.optional<Schema.Boolean>;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const WorkspaceConfigSchema: Schema.Struct<{
|
|
10
|
+
readonly version: Schema.withDecodingDefaultTypeKey<Schema.Literal<1>, never>;
|
|
11
|
+
readonly siteUrl: Schema.String;
|
|
12
|
+
readonly documentsDir: Schema.withDecodingDefaultTypeKey<Schema.String, never>;
|
|
13
|
+
readonly customFields: Schema.withDecodingDefaultTypeKey<Schema.$Array<Schema.Struct<{
|
|
14
|
+
readonly displayName: Schema.String;
|
|
15
|
+
readonly fieldId: Schema.optional<Schema.String>;
|
|
16
|
+
readonly shape: Schema.Literals<readonly ["text", "multilineText", "number", "boolean", "date", "singleSelect", "multiSelect", "user", "cascadingSelect"]>;
|
|
17
|
+
readonly ordered: Schema.optional<Schema.Boolean>;
|
|
18
|
+
}>>, never>;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const ManifestIssueSchema: Schema.Struct<{
|
|
21
|
+
readonly issueId: Schema.String;
|
|
22
|
+
readonly issueKey: Schema.String;
|
|
23
|
+
readonly documentPath: Schema.String;
|
|
24
|
+
readonly filenameMode: Schema.Literals<readonly ["convention", "custom"]>;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const SyncManifestSchema: Schema.Struct<{
|
|
27
|
+
readonly version: Schema.Literal<1>;
|
|
28
|
+
readonly siteUrl: Schema.String;
|
|
29
|
+
readonly issues: Schema.$Array<Schema.Struct<{
|
|
30
|
+
readonly issueId: Schema.String;
|
|
31
|
+
readonly issueKey: Schema.String;
|
|
32
|
+
readonly documentPath: Schema.String;
|
|
33
|
+
readonly filenameMode: Schema.Literals<readonly ["convention", "custom"]>;
|
|
34
|
+
}>>;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const SyncFieldValueSchema: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null, Schema.Struct<{
|
|
37
|
+
readonly accountId: Schema.String;
|
|
38
|
+
readonly displayName: Schema.String;
|
|
39
|
+
}>, Schema.Struct<{
|
|
40
|
+
readonly id: Schema.optional<Schema.String>;
|
|
41
|
+
readonly value: Schema.String;
|
|
42
|
+
}>, Schema.Struct<{
|
|
43
|
+
readonly parent: Schema.Struct<{
|
|
44
|
+
readonly id: Schema.optional<Schema.String>;
|
|
45
|
+
readonly value: Schema.String;
|
|
46
|
+
}>;
|
|
47
|
+
readonly child: Schema.optional<Schema.Struct<{
|
|
48
|
+
readonly id: Schema.optional<Schema.String>;
|
|
49
|
+
readonly value: Schema.String;
|
|
50
|
+
}>>;
|
|
51
|
+
}>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Struct<{
|
|
52
|
+
readonly accountId: Schema.String;
|
|
53
|
+
readonly displayName: Schema.String;
|
|
54
|
+
}>, Schema.Struct<{
|
|
55
|
+
readonly id: Schema.optional<Schema.String>;
|
|
56
|
+
readonly value: Schema.String;
|
|
57
|
+
}>]>>]>;
|
|
58
|
+
export declare const BaselineCustomFieldSchema: Schema.Struct<{
|
|
59
|
+
readonly fieldId: Schema.String;
|
|
60
|
+
readonly displayName: Schema.String;
|
|
61
|
+
readonly shape: Schema.Literals<readonly ["text", "multilineText", "number", "boolean", "date", "singleSelect", "multiSelect", "user", "cascadingSelect"]>;
|
|
62
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null, Schema.Struct<{
|
|
63
|
+
readonly accountId: Schema.String;
|
|
64
|
+
readonly displayName: Schema.String;
|
|
65
|
+
}>, Schema.Struct<{
|
|
66
|
+
readonly id: Schema.optional<Schema.String>;
|
|
67
|
+
readonly value: Schema.String;
|
|
68
|
+
}>, Schema.Struct<{
|
|
69
|
+
readonly parent: Schema.Struct<{
|
|
70
|
+
readonly id: Schema.optional<Schema.String>;
|
|
71
|
+
readonly value: Schema.String;
|
|
72
|
+
}>;
|
|
73
|
+
readonly child: Schema.optional<Schema.Struct<{
|
|
74
|
+
readonly id: Schema.optional<Schema.String>;
|
|
75
|
+
readonly value: Schema.String;
|
|
76
|
+
}>>;
|
|
77
|
+
}>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Struct<{
|
|
78
|
+
readonly accountId: Schema.String;
|
|
79
|
+
readonly displayName: Schema.String;
|
|
80
|
+
}>, Schema.Struct<{
|
|
81
|
+
readonly id: Schema.optional<Schema.String>;
|
|
82
|
+
readonly value: Schema.String;
|
|
83
|
+
}>]>>]>;
|
|
84
|
+
}>;
|
|
85
|
+
export declare const SyncBaselineSchema: Schema.Struct<{
|
|
86
|
+
readonly version: Schema.Literal<1>;
|
|
87
|
+
readonly issueId: Schema.String;
|
|
88
|
+
readonly issueKey: Schema.String;
|
|
89
|
+
readonly fields: Schema.Struct<{
|
|
90
|
+
readonly summary: Schema.String;
|
|
91
|
+
readonly description: Schema.String;
|
|
92
|
+
readonly labels: Schema.$Array<Schema.String>;
|
|
93
|
+
readonly customFields: Schema.$Record<Schema.String, Schema.Struct<{
|
|
94
|
+
readonly fieldId: Schema.String;
|
|
95
|
+
readonly displayName: Schema.String;
|
|
96
|
+
readonly shape: Schema.Literals<readonly ["text", "multilineText", "number", "boolean", "date", "singleSelect", "multiSelect", "user", "cascadingSelect"]>;
|
|
97
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null, Schema.Struct<{
|
|
98
|
+
readonly accountId: Schema.String;
|
|
99
|
+
readonly displayName: Schema.String;
|
|
100
|
+
}>, Schema.Struct<{
|
|
101
|
+
readonly id: Schema.optional<Schema.String>;
|
|
102
|
+
readonly value: Schema.String;
|
|
103
|
+
}>, Schema.Struct<{
|
|
104
|
+
readonly parent: Schema.Struct<{
|
|
105
|
+
readonly id: Schema.optional<Schema.String>;
|
|
106
|
+
readonly value: Schema.String;
|
|
107
|
+
}>;
|
|
108
|
+
readonly child: Schema.optional<Schema.Struct<{
|
|
109
|
+
readonly id: Schema.optional<Schema.String>;
|
|
110
|
+
readonly value: Schema.String;
|
|
111
|
+
}>>;
|
|
112
|
+
}>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Struct<{
|
|
113
|
+
readonly accountId: Schema.String;
|
|
114
|
+
readonly displayName: Schema.String;
|
|
115
|
+
}>, Schema.Struct<{
|
|
116
|
+
readonly id: Schema.optional<Schema.String>;
|
|
117
|
+
readonly value: Schema.String;
|
|
118
|
+
}>]>>]>;
|
|
119
|
+
}>>;
|
|
120
|
+
}>;
|
|
121
|
+
readonly comments: Schema.$Array<Schema.Struct<{
|
|
122
|
+
readonly id: Schema.String;
|
|
123
|
+
}>>;
|
|
124
|
+
}>;
|
|
125
|
+
export type WorkspaceConfig = Schema.Schema.Type<typeof WorkspaceConfigSchema>;
|
|
126
|
+
export type SyncManifest = Schema.Schema.Type<typeof SyncManifestSchema>;
|
|
127
|
+
export type SyncBaseline = Schema.Schema.Type<typeof SyncBaselineSchema>;
|
|
128
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/internal/sync/schemas.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AASvC,eAAO,MAAM,gBAAgB,4IAAgC,CAAA;AAE7D,eAAO,MAAM,0BAA0B;;;;;EAKrC,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;EAOhC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;EAK9B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;EAI7B,CAAA;AAyBF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;OAS/B,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;EAKpC,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW7B,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAC9E,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAA;AACxE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime schemas for Jira Markdown Sync local workspace files.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Schema from "effect/Schema";
|
|
8
|
+
import { FIELD_SHAPES } from "./types.js";
|
|
9
|
+
const SiteUrl = Schema.String.pipe(Schema.check(Schema.isPattern(/^https:\/\/[a-z0-9][a-z0-9-]*\.atlassian\.net$/)));
|
|
10
|
+
const NonEmptyString = Schema.String.pipe(Schema.check(Schema.isMinLength(1)));
|
|
11
|
+
export const FieldShapeSchema = Schema.Literals(FIELD_SHAPES);
|
|
12
|
+
export const RequestedCustomFieldSchema = Schema.Struct({
|
|
13
|
+
displayName: NonEmptyString,
|
|
14
|
+
fieldId: Schema.optional(NonEmptyString),
|
|
15
|
+
shape: FieldShapeSchema,
|
|
16
|
+
ordered: Schema.optional(Schema.Boolean)
|
|
17
|
+
});
|
|
18
|
+
export const WorkspaceConfigSchema = Schema.Struct({
|
|
19
|
+
version: Schema.Literal(1).pipe(Schema.withDecodingDefaultTypeKey(Effect.succeed(1))),
|
|
20
|
+
siteUrl: SiteUrl,
|
|
21
|
+
documentsDir: NonEmptyString.pipe(Schema.withDecodingDefaultTypeKey(Effect.succeed("issues"))),
|
|
22
|
+
customFields: Schema.Array(RequestedCustomFieldSchema).pipe(Schema.withDecodingDefaultTypeKey(Effect.succeed([])))
|
|
23
|
+
});
|
|
24
|
+
export const ManifestIssueSchema = Schema.Struct({
|
|
25
|
+
issueId: NonEmptyString,
|
|
26
|
+
issueKey: NonEmptyString,
|
|
27
|
+
documentPath: NonEmptyString,
|
|
28
|
+
filenameMode: Schema.Literals(["convention", "custom"])
|
|
29
|
+
});
|
|
30
|
+
export const SyncManifestSchema = Schema.Struct({
|
|
31
|
+
version: Schema.Literal(1),
|
|
32
|
+
siteUrl: SiteUrl,
|
|
33
|
+
issues: Schema.Array(ManifestIssueSchema)
|
|
34
|
+
});
|
|
35
|
+
const UserFieldValueSchema = Schema.Struct({
|
|
36
|
+
accountId: NonEmptyString,
|
|
37
|
+
displayName: NonEmptyString
|
|
38
|
+
});
|
|
39
|
+
const OptionFieldValueSchema = Schema.Struct({
|
|
40
|
+
id: Schema.optional(NonEmptyString),
|
|
41
|
+
value: NonEmptyString
|
|
42
|
+
});
|
|
43
|
+
const CascadingFieldValueSchema = Schema.Struct({
|
|
44
|
+
parent: OptionFieldValueSchema,
|
|
45
|
+
child: Schema.optional(OptionFieldValueSchema)
|
|
46
|
+
});
|
|
47
|
+
const SyncFieldValueItemSchema = Schema.Union([
|
|
48
|
+
Schema.String,
|
|
49
|
+
Schema.Number,
|
|
50
|
+
Schema.Boolean,
|
|
51
|
+
UserFieldValueSchema,
|
|
52
|
+
OptionFieldValueSchema
|
|
53
|
+
]);
|
|
54
|
+
export const SyncFieldValueSchema = Schema.Union([
|
|
55
|
+
Schema.String,
|
|
56
|
+
Schema.Number,
|
|
57
|
+
Schema.Boolean,
|
|
58
|
+
Schema.Null,
|
|
59
|
+
UserFieldValueSchema,
|
|
60
|
+
OptionFieldValueSchema,
|
|
61
|
+
CascadingFieldValueSchema,
|
|
62
|
+
Schema.Array(SyncFieldValueItemSchema)
|
|
63
|
+
]);
|
|
64
|
+
export const BaselineCustomFieldSchema = Schema.Struct({
|
|
65
|
+
fieldId: NonEmptyString,
|
|
66
|
+
displayName: NonEmptyString,
|
|
67
|
+
shape: FieldShapeSchema,
|
|
68
|
+
value: SyncFieldValueSchema
|
|
69
|
+
});
|
|
70
|
+
export const SyncBaselineSchema = Schema.Struct({
|
|
71
|
+
version: Schema.Literal(1),
|
|
72
|
+
issueId: NonEmptyString,
|
|
73
|
+
issueKey: NonEmptyString,
|
|
74
|
+
fields: Schema.Struct({
|
|
75
|
+
summary: Schema.String,
|
|
76
|
+
description: Schema.String,
|
|
77
|
+
labels: Schema.Array(Schema.String),
|
|
78
|
+
customFields: Schema.Record(Schema.String, BaselineCustomFieldSchema)
|
|
79
|
+
}),
|
|
80
|
+
comments: Schema.Array(Schema.Struct({ id: NonEmptyString }))
|
|
81
|
+
});
|
|
82
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/internal/sync/schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAChC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,gDAAgD,CAAC,CAAC,CACjF,CAAA;AAED,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAE9E,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;AAE7D,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC;IACtD,WAAW,EAAE,cAAc;IAC3B,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC;IACxC,KAAK,EAAE,gBAAgB;IACvB,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;CACzC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC,MAAM,CAAC,OAAO,CAAC,CAAU,CAAC,CAAC,CAAC;IAC9F,OAAO,EAAE,OAAO;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
|
|
5
|
+
*/
|
|
6
|
+
export declare const FIELD_SHAPES: readonly ["text", "multilineText", "number", "boolean", "date", "singleSelect", "multiSelect", "user", "cascadingSelect"];
|
|
7
|
+
export type FieldShape = typeof FIELD_SHAPES[number];
|
|
8
|
+
export interface RequestedCustomField {
|
|
9
|
+
readonly displayName: string;
|
|
10
|
+
readonly fieldId?: string | undefined;
|
|
11
|
+
readonly shape: FieldShape;
|
|
12
|
+
readonly ordered?: boolean | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface WorkspaceConfig {
|
|
15
|
+
readonly version: 1;
|
|
16
|
+
readonly siteUrl: string;
|
|
17
|
+
readonly documentsDir: string;
|
|
18
|
+
readonly customFields: ReadonlyArray<RequestedCustomField>;
|
|
19
|
+
}
|
|
20
|
+
export type FilenameMode = "convention" | "custom";
|
|
21
|
+
export interface ManifestIssue {
|
|
22
|
+
readonly issueId: string;
|
|
23
|
+
readonly issueKey: string;
|
|
24
|
+
readonly documentPath: string;
|
|
25
|
+
readonly filenameMode: FilenameMode;
|
|
26
|
+
}
|
|
27
|
+
export interface SyncManifest {
|
|
28
|
+
readonly version: 1;
|
|
29
|
+
readonly siteUrl: string;
|
|
30
|
+
readonly issues: ReadonlyArray<ManifestIssue>;
|
|
31
|
+
}
|
|
32
|
+
export interface UserFieldValue {
|
|
33
|
+
readonly accountId: string;
|
|
34
|
+
readonly displayName: string;
|
|
35
|
+
}
|
|
36
|
+
export interface OptionFieldValue {
|
|
37
|
+
readonly id?: string | undefined;
|
|
38
|
+
readonly value: string;
|
|
39
|
+
}
|
|
40
|
+
export interface CascadingFieldValue {
|
|
41
|
+
readonly parent: OptionFieldValue;
|
|
42
|
+
readonly child?: OptionFieldValue | undefined;
|
|
43
|
+
}
|
|
44
|
+
export type SyncFieldScalar = string | number | boolean | null;
|
|
45
|
+
export type SyncFieldValue = SyncFieldScalar | UserFieldValue | OptionFieldValue | CascadingFieldValue | ReadonlyArray<string | number | boolean | UserFieldValue | OptionFieldValue>;
|
|
46
|
+
export interface BaselineCustomField {
|
|
47
|
+
readonly fieldId: string;
|
|
48
|
+
readonly displayName: string;
|
|
49
|
+
readonly shape: FieldShape;
|
|
50
|
+
readonly value: SyncFieldValue;
|
|
51
|
+
}
|
|
52
|
+
export interface SyncBaselineFields {
|
|
53
|
+
readonly summary: string;
|
|
54
|
+
readonly description: string;
|
|
55
|
+
readonly labels: ReadonlyArray<string>;
|
|
56
|
+
readonly customFields: Readonly<Record<string, BaselineCustomField>>;
|
|
57
|
+
}
|
|
58
|
+
export interface SyncBaselineComment {
|
|
59
|
+
readonly id: string;
|
|
60
|
+
}
|
|
61
|
+
export interface SyncBaseline {
|
|
62
|
+
readonly version: 1;
|
|
63
|
+
readonly issueId: string;
|
|
64
|
+
readonly issueKey: string;
|
|
65
|
+
readonly fields: SyncBaselineFields;
|
|
66
|
+
readonly comments: ReadonlyArray<SyncBaselineComment>;
|
|
67
|
+
}
|
|
68
|
+
export interface IssueDocumentFrontMatter {
|
|
69
|
+
readonly issueId: string;
|
|
70
|
+
readonly issueKey: string;
|
|
71
|
+
readonly summary: string;
|
|
72
|
+
readonly status: string;
|
|
73
|
+
readonly issueType: string;
|
|
74
|
+
readonly priority: string | null;
|
|
75
|
+
readonly assignee: UserFieldValue | null;
|
|
76
|
+
readonly reporter: UserFieldValue | null;
|
|
77
|
+
readonly labels: ReadonlyArray<string>;
|
|
78
|
+
readonly customFields: Readonly<Record<string, SyncFieldValue>>;
|
|
79
|
+
}
|
|
80
|
+
export interface CommentDraft {
|
|
81
|
+
readonly draftId: string;
|
|
82
|
+
readonly body: string;
|
|
83
|
+
}
|
|
84
|
+
export interface AcceptedComment {
|
|
85
|
+
readonly id: string;
|
|
86
|
+
readonly author: string;
|
|
87
|
+
readonly created: string;
|
|
88
|
+
readonly body: string;
|
|
89
|
+
}
|
|
90
|
+
export interface AttachmentReference {
|
|
91
|
+
readonly filename: string;
|
|
92
|
+
readonly url: string;
|
|
93
|
+
}
|
|
94
|
+
export interface IssueDocument {
|
|
95
|
+
readonly frontMatter: IssueDocumentFrontMatter;
|
|
96
|
+
readonly description: string;
|
|
97
|
+
readonly multilineCustomFields: Readonly<Record<string, string>>;
|
|
98
|
+
readonly commentDrafts: ReadonlyArray<CommentDraft>;
|
|
99
|
+
readonly acceptedComments: ReadonlyArray<AcceptedComment>;
|
|
100
|
+
readonly attachments: ReadonlyArray<AttachmentReference>;
|
|
101
|
+
readonly localNotes: string;
|
|
102
|
+
}
|
|
103
|
+
export type SyncFieldPath = "summary" | "description" | "labels" | `customFields.${string}` | `readOnly.${string}`;
|
|
104
|
+
export interface SyncValidationFailure {
|
|
105
|
+
readonly _tag: "ValidationFailure";
|
|
106
|
+
readonly message: string;
|
|
107
|
+
readonly issueKey?: string;
|
|
108
|
+
readonly field?: SyncFieldPath;
|
|
109
|
+
readonly path?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface SyncConflict {
|
|
112
|
+
readonly issueId: string;
|
|
113
|
+
readonly issueKey: string;
|
|
114
|
+
readonly field: SyncFieldPath;
|
|
115
|
+
readonly baselineValue: SyncFieldValue;
|
|
116
|
+
readonly jiraValue: SyncFieldValue;
|
|
117
|
+
readonly documentValue: SyncFieldValue;
|
|
118
|
+
}
|
|
119
|
+
export type PlannedFieldChange = {
|
|
120
|
+
readonly _tag: "RemoteOnly";
|
|
121
|
+
readonly issueId: string;
|
|
122
|
+
readonly issueKey: string;
|
|
123
|
+
readonly field: SyncFieldPath;
|
|
124
|
+
readonly jiraValue: SyncFieldValue;
|
|
125
|
+
} | {
|
|
126
|
+
readonly _tag: "LocalOnly";
|
|
127
|
+
readonly issueId: string;
|
|
128
|
+
readonly issueKey: string;
|
|
129
|
+
readonly field: SyncFieldPath;
|
|
130
|
+
readonly documentValue: SyncFieldValue;
|
|
131
|
+
} | {
|
|
132
|
+
readonly _tag: "Conflict";
|
|
133
|
+
readonly issueId: string;
|
|
134
|
+
readonly issueKey: string;
|
|
135
|
+
readonly field: SyncFieldPath;
|
|
136
|
+
readonly baselineValue: SyncFieldValue;
|
|
137
|
+
readonly jiraValue: SyncFieldValue;
|
|
138
|
+
readonly documentValue: SyncFieldValue;
|
|
139
|
+
};
|
|
140
|
+
export interface SyncPlan {
|
|
141
|
+
readonly changes: ReadonlyArray<PlannedFieldChange>;
|
|
142
|
+
readonly validationFailures: ReadonlyArray<SyncValidationFailure>;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/internal/sync/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,YAAY,2HAUf,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,OAAO,YAAY,CAAC,MAAM,CAAC,CAAA;AAEpD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACvC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAA;CAC3D;AAED,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,QAAQ,CAAA;AAElD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAA;CACpC;A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7
|
+
"text",
|
|
8
|
+
"multilineText",
|
|
9
|
+
"number",
|
|
10
|
+
"boolean",
|
|
11
|
+
"date",
|
|
12
|
+
"singleSelect",
|
|
13
|
+
"multiSelect",
|
|
14
|
+
"user",
|
|
15
|
+
"cascadingSelect"
|
|
16
|
+
];
|
|
17
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/sync/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM;IACN,eAAe;IACf,QAAQ;IACR,SAAS;IACT,MAAM;IACN,cAAc;IACd,aAAa;IACb,MAAM;IACN,iBAAiB;CACT,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knpkv/jira-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "CLI tool to fetch Jira tickets and export to markdown",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "knpkv",
|
|
@@ -51,12 +51,14 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@effect/platform-node": "4.0.0-beta.87",
|
|
53
53
|
"gray-matter": "^4.0.3",
|
|
54
|
-
"
|
|
55
|
-
"@knpkv/
|
|
56
|
-
"@knpkv/jira-api-client": "0.3.0"
|
|
54
|
+
"js-yaml": "^4.1.0",
|
|
55
|
+
"@knpkv/agent-skills": "^0.2.2",
|
|
56
|
+
"@knpkv/jira-api-client": "0.3.0",
|
|
57
|
+
"@knpkv/atlassian-common": "0.4.0"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@effect/vitest": "4.0.0-beta.87",
|
|
61
|
+
"@types/js-yaml": "^4.0.9",
|
|
60
62
|
"@types/node": "latest",
|
|
61
63
|
"effect": "4.0.0-beta.87",
|
|
62
64
|
"typescript": "~6.0.3",
|
|
@@ -76,6 +78,7 @@
|
|
|
76
78
|
"build": "tsc",
|
|
77
79
|
"clean": "rimraf dist dist-test .tsbuildinfo",
|
|
78
80
|
"test": "vitest run",
|
|
81
|
+
"test:integration": "vitest run --config vitest.config.integration.ts",
|
|
79
82
|
"test:watch": "vitest",
|
|
80
83
|
"lint": "eslint src",
|
|
81
84
|
"lint:fix": "eslint src --fix",
|
package/skills/jira/SKILL.md
CHANGED
|
@@ -10,9 +10,10 @@ Use the `jira` binary for Jira Cloud issue export and release-version workflows.
|
|
|
10
10
|
## Preconditions
|
|
11
11
|
|
|
12
12
|
- Authenticate first with `jira auth status`, `jira auth create`, `jira auth configure`, and `jira auth login`.
|
|
13
|
+
- For multi-account or multi-site setups, inspect `jira auth profiles` and switch with `jira auth use <profile>` before reading or writing project data. When the `atlassian` binary is available, prefer `atlassian profiles doctor` for a cross-tool Jira/Confluence/Jira Clockify check and `atlassian auth refresh` for expired active tokens.
|
|
13
14
|
- Use `--json` on version commands when the agent needs structured data.
|
|
14
|
-
- Use numeric version ids for `jira version
|
|
15
|
-
- Confirm before
|
|
15
|
+
- Use numeric version ids for `jira version get`, `jira version update`, and `jira version related-work`.
|
|
16
|
+
- Confirm before remote write commands: `jira version update` and `jira version related-work add`.
|
|
16
17
|
|
|
17
18
|
## Authentication
|
|
18
19
|
|
|
@@ -22,30 +23,40 @@ jira auth create
|
|
|
22
23
|
jira auth configure --client-id <id> --client-secret <secret>
|
|
23
24
|
jira auth login
|
|
24
25
|
jira auth login --site https://example.atlassian.net
|
|
26
|
+
jira auth profiles
|
|
27
|
+
jira auth use <profile>
|
|
28
|
+
jira auth remove <profile>
|
|
29
|
+
|
|
30
|
+
atlassian profiles list
|
|
31
|
+
atlassian profiles doctor
|
|
32
|
+
atlassian profiles use <profile>
|
|
33
|
+
atlassian auth refresh
|
|
25
34
|
```
|
|
26
35
|
|
|
27
36
|
OAuth scopes used by release workflows include `read:jira-work`, `write:jira-work`, `manage:jira-project`, `read:jira-user`, `read:me`, and `offline_access`.
|
|
28
37
|
|
|
38
|
+
`<profile>` may be a profile ID, profile name, site URL, cloud ID, or account ID. `jira auth status` shows the active profile. `atlassian profiles use <profile>` only switches matching profiles already present in each auth store; it does not copy OAuth tokens between stores.
|
|
39
|
+
|
|
29
40
|
## Issue Export
|
|
30
41
|
|
|
31
42
|
Fetch one issue as markdown:
|
|
32
43
|
|
|
33
44
|
```bash
|
|
34
|
-
jira get PROJ-123 --output-dir ./jira-tickets
|
|
45
|
+
jira issue get PROJ-123 --output-dir ./jira-tickets
|
|
35
46
|
```
|
|
36
47
|
|
|
37
48
|
Search with JQL:
|
|
38
49
|
|
|
39
50
|
```bash
|
|
40
|
-
jira search 'project = PROJ AND status = Done' --output-dir ./jira-tickets
|
|
41
|
-
jira search 'fixVersion = "1.0.0"' --format single --max-results 200
|
|
51
|
+
jira issue search 'project = PROJ AND status = Done' --output-dir ./jira-tickets
|
|
52
|
+
jira issue search 'fixVersion = "1.0.0"' --format single --max-results 200
|
|
42
53
|
```
|
|
43
54
|
|
|
44
55
|
Search by fix version:
|
|
45
56
|
|
|
46
57
|
```bash
|
|
47
|
-
jira search --by-version "1.0.0" --project PROJ
|
|
48
|
-
jira search --by-version "1.0.0" --project PROJ --format single
|
|
58
|
+
jira issue search --by-version "1.0.0" --project PROJ
|
|
59
|
+
jira issue search --by-version "1.0.0" --project PROJ --format single
|
|
49
60
|
```
|
|
50
61
|
|
|
51
62
|
Output formats:
|
|
@@ -66,25 +77,26 @@ jira version list --project PROJ --custom-field "Security & Compliance Impact" -
|
|
|
66
77
|
View a version:
|
|
67
78
|
|
|
68
79
|
```bash
|
|
69
|
-
jira version
|
|
80
|
+
jira version get 10042 --json
|
|
70
81
|
```
|
|
71
82
|
|
|
72
83
|
Update a version description:
|
|
73
84
|
|
|
74
85
|
```bash
|
|
75
|
-
jira version
|
|
86
|
+
jira version update 10042 --description "Q3 release"
|
|
76
87
|
```
|
|
77
88
|
|
|
78
89
|
Manage related work links:
|
|
79
90
|
|
|
80
91
|
```bash
|
|
81
|
-
jira version
|
|
82
|
-
jira version
|
|
92
|
+
jira version related-work list 10042 --json
|
|
93
|
+
jira version related-work add 10042 --title "Release notes" --url "https://example.atlassian.net/wiki/spaces/PROJ/pages/123" --category Communication
|
|
83
94
|
```
|
|
84
95
|
|
|
85
96
|
## Agent Workflow
|
|
86
97
|
|
|
87
98
|
1. Use read-only commands first to find issue keys, version ids, and current release metadata.
|
|
88
99
|
2. Prefer `--json` for release metadata and parse the resulting JSON instead of scraping tables.
|
|
89
|
-
3.
|
|
90
|
-
4.
|
|
100
|
+
3. Verify the active auth profile when the user names a site/account or when remote writes are involved; use `atlassian profiles doctor` for multi-tool profile, token, and scope checks when available.
|
|
101
|
+
4. Avoid printing tokens or OAuth secrets. Let interactive commands prompt for secrets when needed.
|
|
102
|
+
5. Confirm exact version id, title, URL, category, or description before mutating Jira.
|