@digipair/skill-git 0.7.2 → 0.8.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/index.cjs.js +22 -5
- package/index.esm.js +22 -6
- package/libs/skill-git/src/lib/skill-git.d.ts +1 -0
- package/package.json +1 -1
- package/schema.json +126 -0
package/index.cjs.js
CHANGED
|
@@ -6792,21 +6792,38 @@ let GitService = class GitService {
|
|
|
6792
6792
|
async commit(params, _pinsSettingsList, context) {
|
|
6793
6793
|
const now = new Date();
|
|
6794
6794
|
const { path = context.privates.GIT_PATH || '.', selector = '*', message = `${now.getUTCFullYear()}-${(now.getUTCMonth() + 1).toString().padStart(2, '0')}-${now.getUTCDate().toString().padStart(2, '0')}-${now.getUTCHours().toString().padStart(2, '0')}:${now.getUTCMinutes().toString().padStart(2, '0')}:${now.getUTCSeconds().toString().padStart(2, '0')}:${now.getUTCMilliseconds().toString().padStart(3, '0')}` } = params;
|
|
6795
|
-
return await simpleGit().add(
|
|
6795
|
+
return await simpleGit(path).add(selector).commit(message);
|
|
6796
6796
|
}
|
|
6797
6797
|
async push(params, _pinsSettingsList, context) {
|
|
6798
|
-
const { options = [] } = params;
|
|
6799
|
-
return await simpleGit().push(options);
|
|
6798
|
+
const { path = context.privates.GIT_PATH || '.', options = [] } = params;
|
|
6799
|
+
return await simpleGit(path).push(options);
|
|
6800
6800
|
}
|
|
6801
6801
|
async show(params, _pinsSettingsList, context) {
|
|
6802
|
-
const { options = [] } = params;
|
|
6803
|
-
return await simpleGit().show(options);
|
|
6802
|
+
const { path = context.privates.GIT_PATH || '.', options = [] } = params;
|
|
6803
|
+
return await simpleGit(path).show(options);
|
|
6804
|
+
}
|
|
6805
|
+
async log(params, _pinsSettingsList, context) {
|
|
6806
|
+
const { path = context.privates.GIT_PATH || '.', file, format, from, mailMap, maxCount, multiLine, splitter, strictDate, symmetric, to } = params;
|
|
6807
|
+
return await simpleGit(path).log({
|
|
6808
|
+
file,
|
|
6809
|
+
format,
|
|
6810
|
+
from,
|
|
6811
|
+
mailMap,
|
|
6812
|
+
maxCount,
|
|
6813
|
+
multiLine,
|
|
6814
|
+
splitter,
|
|
6815
|
+
strictDate,
|
|
6816
|
+
symmetric,
|
|
6817
|
+
to
|
|
6818
|
+
});
|
|
6804
6819
|
}
|
|
6805
6820
|
};
|
|
6806
6821
|
const commit = (params, pinsSettingsList, context)=>new GitService().commit(params, pinsSettingsList, context);
|
|
6807
6822
|
const push = (params, pinsSettingsList, context)=>new GitService().push(params, pinsSettingsList, context);
|
|
6808
6823
|
const show = (params, pinsSettingsList, context)=>new GitService().show(params, pinsSettingsList, context);
|
|
6824
|
+
const log = (params, pinsSettingsList, context)=>new GitService().log(params, pinsSettingsList, context);
|
|
6809
6825
|
|
|
6810
6826
|
exports.commit = commit;
|
|
6827
|
+
exports.log = log;
|
|
6811
6828
|
exports.push = push;
|
|
6812
6829
|
exports.show = show;
|
package/index.esm.js
CHANGED
|
@@ -6781,19 +6781,35 @@ let GitService = class GitService {
|
|
|
6781
6781
|
async commit(params, _pinsSettingsList, context) {
|
|
6782
6782
|
const now = new Date();
|
|
6783
6783
|
const { path = context.privates.GIT_PATH || '.', selector = '*', message = `${now.getUTCFullYear()}-${(now.getUTCMonth() + 1).toString().padStart(2, '0')}-${now.getUTCDate().toString().padStart(2, '0')}-${now.getUTCHours().toString().padStart(2, '0')}:${now.getUTCMinutes().toString().padStart(2, '0')}:${now.getUTCSeconds().toString().padStart(2, '0')}:${now.getUTCMilliseconds().toString().padStart(3, '0')}` } = params;
|
|
6784
|
-
return await simpleGit().add(
|
|
6784
|
+
return await simpleGit(path).add(selector).commit(message);
|
|
6785
6785
|
}
|
|
6786
6786
|
async push(params, _pinsSettingsList, context) {
|
|
6787
|
-
const { options = [] } = params;
|
|
6788
|
-
return await simpleGit().push(options);
|
|
6787
|
+
const { path = context.privates.GIT_PATH || '.', options = [] } = params;
|
|
6788
|
+
return await simpleGit(path).push(options);
|
|
6789
6789
|
}
|
|
6790
6790
|
async show(params, _pinsSettingsList, context) {
|
|
6791
|
-
const { options = [] } = params;
|
|
6792
|
-
return await simpleGit().show(options);
|
|
6791
|
+
const { path = context.privates.GIT_PATH || '.', options = [] } = params;
|
|
6792
|
+
return await simpleGit(path).show(options);
|
|
6793
|
+
}
|
|
6794
|
+
async log(params, _pinsSettingsList, context) {
|
|
6795
|
+
const { path = context.privates.GIT_PATH || '.', file, format, from, mailMap, maxCount, multiLine, splitter, strictDate, symmetric, to } = params;
|
|
6796
|
+
return await simpleGit(path).log({
|
|
6797
|
+
file,
|
|
6798
|
+
format,
|
|
6799
|
+
from,
|
|
6800
|
+
mailMap,
|
|
6801
|
+
maxCount,
|
|
6802
|
+
multiLine,
|
|
6803
|
+
splitter,
|
|
6804
|
+
strictDate,
|
|
6805
|
+
symmetric,
|
|
6806
|
+
to
|
|
6807
|
+
});
|
|
6793
6808
|
}
|
|
6794
6809
|
};
|
|
6795
6810
|
const commit = (params, pinsSettingsList, context)=>new GitService().commit(params, pinsSettingsList, context);
|
|
6796
6811
|
const push = (params, pinsSettingsList, context)=>new GitService().push(params, pinsSettingsList, context);
|
|
6797
6812
|
const show = (params, pinsSettingsList, context)=>new GitService().show(params, pinsSettingsList, context);
|
|
6813
|
+
const log = (params, pinsSettingsList, context)=>new GitService().log(params, pinsSettingsList, context);
|
|
6798
6814
|
|
|
6799
|
-
export { commit, push, show };
|
|
6815
|
+
export { commit, log, push, show };
|
|
@@ -2,3 +2,4 @@ import { PinsSettings } from '@digipair/engine';
|
|
|
2
2
|
export declare const commit: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<import("simple-git").CommitResult>;
|
|
3
3
|
export declare const push: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<import("simple-git").PushResult>;
|
|
4
4
|
export declare const show: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<string>;
|
|
5
|
+
export declare const log: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<import("simple-git").LogResult<any>>;
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -49,6 +49,15 @@
|
|
|
49
49
|
"tags": ["service"],
|
|
50
50
|
"summary": "Push GIT",
|
|
51
51
|
"parameters": [
|
|
52
|
+
{
|
|
53
|
+
"name": "path",
|
|
54
|
+
"summary": "Path du dépot",
|
|
55
|
+
"required": false,
|
|
56
|
+
"description": "Path du dépot GIT",
|
|
57
|
+
"schema": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
52
61
|
{
|
|
53
62
|
"name": "options",
|
|
54
63
|
"summary": "Options",
|
|
@@ -70,6 +79,15 @@
|
|
|
70
79
|
"tags": ["service"],
|
|
71
80
|
"summary": "Show GIT",
|
|
72
81
|
"parameters": [
|
|
82
|
+
{
|
|
83
|
+
"name": "path",
|
|
84
|
+
"summary": "Path du dépot",
|
|
85
|
+
"required": false,
|
|
86
|
+
"description": "Path du dépot GIT",
|
|
87
|
+
"schema": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
73
91
|
{
|
|
74
92
|
"name": "options",
|
|
75
93
|
"summary": "Options",
|
|
@@ -85,6 +103,114 @@
|
|
|
85
103
|
],
|
|
86
104
|
"x-events": []
|
|
87
105
|
}
|
|
106
|
+
},
|
|
107
|
+
"/log": {
|
|
108
|
+
"post": {
|
|
109
|
+
"tags": ["service"],
|
|
110
|
+
"summary": "Log GIT",
|
|
111
|
+
"parameters": [
|
|
112
|
+
{
|
|
113
|
+
"name": "path",
|
|
114
|
+
"summary": "Path du dépot",
|
|
115
|
+
"required": false,
|
|
116
|
+
"description": "Path du dépot GIT",
|
|
117
|
+
"schema": {
|
|
118
|
+
"type": "string"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "file",
|
|
123
|
+
"summary": "Fichier",
|
|
124
|
+
"required": false,
|
|
125
|
+
"description": "Fichier concerné par le log",
|
|
126
|
+
"schema": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "format",
|
|
132
|
+
"summary": "Format de sortie",
|
|
133
|
+
"required": false,
|
|
134
|
+
"description": "Format de sortie décrit au pretty format",
|
|
135
|
+
"schema": {
|
|
136
|
+
"type": "string"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "from",
|
|
141
|
+
"summary": "Commit de départ",
|
|
142
|
+
"required": false,
|
|
143
|
+
"description": "Identifiant du commit de départ",
|
|
144
|
+
"schema": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "to",
|
|
150
|
+
"summary": "Commit dse fin",
|
|
151
|
+
"required": false,
|
|
152
|
+
"description": "Identifiant du commit de fin",
|
|
153
|
+
"schema": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "mailMap",
|
|
159
|
+
"summary": "Mapping de mail",
|
|
160
|
+
"required": false,
|
|
161
|
+
"description": "Active l'utilisation du mapping des emails dans les valeurs de retour pour le courrier électronique et le nom à partir du format par défaut",
|
|
162
|
+
"schema": {
|
|
163
|
+
"type": "boolean"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "maxCount",
|
|
168
|
+
"summary": "Nombre de résultats maximum",
|
|
169
|
+
"required": false,
|
|
170
|
+
"description": "Limite le nombre de résultats à retourner",
|
|
171
|
+
"schema": {
|
|
172
|
+
"type": "number"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "multiline",
|
|
177
|
+
"summary": "Multiligne",
|
|
178
|
+
"required": false,
|
|
179
|
+
"description": "Active les valeurs multilignes dans le format par défaut",
|
|
180
|
+
"schema": {
|
|
181
|
+
"type": "boolean"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "splitter",
|
|
186
|
+
"summary": "Splitter",
|
|
187
|
+
"required": false,
|
|
188
|
+
"description": "Séquence de caractères à utiliser comme délimiteur entre les champs dans le journal, doit être une valeur qui n'apparaît dans aucun message de journal (par défaut à ò)",
|
|
189
|
+
"schema": {
|
|
190
|
+
"type": "string"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "strictDate",
|
|
195
|
+
"summary": "Date stricte",
|
|
196
|
+
"required": false,
|
|
197
|
+
"description": "bascule la valeur de la date d'auteur d'un format similaire à ISO 8601 à un format ISO 8601 strict",
|
|
198
|
+
"schema": {
|
|
199
|
+
"type": "boolean"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "symmetric",
|
|
204
|
+
"summary": "Date stricte",
|
|
205
|
+
"required": false,
|
|
206
|
+
"description": "Active le symmetric revision range plutôt que le two-dot range",
|
|
207
|
+
"schema": {
|
|
208
|
+
"type": "boolean"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"x-events": []
|
|
213
|
+
}
|
|
88
214
|
}
|
|
89
215
|
},
|
|
90
216
|
"components": {},
|