pagan-artifact 0.3.3 → 0.3.4
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/bin/art.js +26 -26
- package/branching/index.js +2 -2
- package/caches/index.js +2 -2
- package/changes/index.js +2 -2
- package/contributions/index.js +1 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/setup/index.js +1 -1
- package/utils/getStateByHash/index.js +1 -1
- package/utils/shouldIgnore/index.js +1 -1
- package/workflow/index.js +2 -2
package/bin/art.js
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
* Artifact - Modern version control.
|
|
5
5
|
* @author Benny Schmidt (https://github.com/bennyschmidt)
|
|
6
6
|
* @project https://github.com/bennyschmidt/artifact
|
|
7
|
-
* CLI (v0.3.
|
|
7
|
+
* CLI (v0.3.4)
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
const artifact = require('../index.js');
|
|
11
11
|
const path = require('path');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Extract command line
|
|
14
|
+
* Extract command line args
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const [,, command, ...
|
|
17
|
+
const [,, command, ...args] = process.argv;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Console text color constants
|
|
@@ -37,7 +37,7 @@ async function run() {
|
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
39
|
case 'init':
|
|
40
|
-
console.log(artifact.init(
|
|
40
|
+
console.log(artifact.init(args[0]));
|
|
41
41
|
|
|
42
42
|
break;
|
|
43
43
|
|
|
@@ -47,15 +47,15 @@ async function run() {
|
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
49
|
case 'clone':
|
|
50
|
-
if (!
|
|
50
|
+
if (!args[0]) {
|
|
51
51
|
throw new Error('Specify a repository slug (handle/repo).');
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
const tokenIndex =
|
|
55
|
-
const cliToken = (tokenIndex !== -1) &&
|
|
54
|
+
const tokenIndex = args.indexOf('--token');
|
|
55
|
+
const cliToken = (tokenIndex !== -1) && args[tokenIndex + 1];
|
|
56
56
|
|
|
57
57
|
console.log(
|
|
58
|
-
await artifact.clone(
|
|
58
|
+
await artifact.clone(args[0], cliToken)
|
|
59
59
|
);
|
|
60
60
|
|
|
61
61
|
break;
|
|
@@ -66,7 +66,7 @@ async function run() {
|
|
|
66
66
|
*/
|
|
67
67
|
|
|
68
68
|
case 'config':
|
|
69
|
-
console.log(artifact.config(
|
|
69
|
+
console.log(artifact.config(args[0], args[1]));
|
|
70
70
|
|
|
71
71
|
break;
|
|
72
72
|
|
|
@@ -144,11 +144,11 @@ async function run() {
|
|
|
144
144
|
*/
|
|
145
145
|
|
|
146
146
|
case 'add':
|
|
147
|
-
if (!
|
|
147
|
+
if (!args[0]) {
|
|
148
148
|
throw new Error('Specify a file path to add.');
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
console.log(artifact.add(
|
|
151
|
+
console.log(artifact.add(args[0]));
|
|
152
152
|
|
|
153
153
|
break;
|
|
154
154
|
|
|
@@ -158,11 +158,11 @@ async function run() {
|
|
|
158
158
|
*/
|
|
159
159
|
|
|
160
160
|
case 'commit':
|
|
161
|
-
if (!
|
|
161
|
+
if (!args[0]) {
|
|
162
162
|
throw new Error('Specify a commit message.');
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
console.log(artifact.commit(
|
|
165
|
+
console.log(artifact.commit(args[0]));
|
|
166
166
|
|
|
167
167
|
break;
|
|
168
168
|
|
|
@@ -173,8 +173,8 @@ async function run() {
|
|
|
173
173
|
|
|
174
174
|
case 'branch':
|
|
175
175
|
const deleteFlags = ['--delete', '-d', '-D'];
|
|
176
|
-
const isDelete = deleteFlags.includes(
|
|
177
|
-
const branchName = isDelete ?
|
|
176
|
+
const isDelete = deleteFlags.includes(args[0]);
|
|
177
|
+
const branchName = isDelete ? args[1] : args[0];
|
|
178
178
|
|
|
179
179
|
const branches = artifact.branch({ name: branchName, isDelete });
|
|
180
180
|
|
|
@@ -194,11 +194,11 @@ async function run() {
|
|
|
194
194
|
*/
|
|
195
195
|
|
|
196
196
|
case 'checkout':
|
|
197
|
-
if (!
|
|
197
|
+
if (!args[0]) {
|
|
198
198
|
throw new Error('Specify a branch name.');
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
console.log(artifact.checkout(
|
|
201
|
+
console.log(artifact.checkout(args[0]));
|
|
202
202
|
|
|
203
203
|
break;
|
|
204
204
|
|
|
@@ -208,11 +208,11 @@ async function run() {
|
|
|
208
208
|
*/
|
|
209
209
|
|
|
210
210
|
case 'merge':
|
|
211
|
-
if (!
|
|
211
|
+
if (!args[0]) {
|
|
212
212
|
throw new Error('Specify a target branch to merge.');
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
console.log(artifact.merge(
|
|
215
|
+
console.log(artifact.merge(args[0]));
|
|
216
216
|
|
|
217
217
|
break;
|
|
218
218
|
|
|
@@ -222,7 +222,7 @@ async function run() {
|
|
|
222
222
|
*/
|
|
223
223
|
|
|
224
224
|
case 'remote':
|
|
225
|
-
console.log(artifact.remote(
|
|
225
|
+
console.log(artifact.remote(args[0]));
|
|
226
226
|
|
|
227
227
|
break;
|
|
228
228
|
|
|
@@ -322,8 +322,8 @@ async function run() {
|
|
|
322
322
|
*/
|
|
323
323
|
|
|
324
324
|
case 'stash':
|
|
325
|
-
const isPop =
|
|
326
|
-
const isList =
|
|
325
|
+
const isPop = args[0] === 'pop';
|
|
326
|
+
const isList = args[0] === 'list';
|
|
327
327
|
const result = artifact.stash({ pop: isPop, list: isList });
|
|
328
328
|
|
|
329
329
|
if (isList && Array.isArray(result)) {
|
|
@@ -348,7 +348,7 @@ async function run() {
|
|
|
348
348
|
*/
|
|
349
349
|
|
|
350
350
|
case 'reset':
|
|
351
|
-
console.log(artifact.reset(
|
|
351
|
+
console.log(artifact.reset(args[0]));
|
|
352
352
|
|
|
353
353
|
break;
|
|
354
354
|
|
|
@@ -359,11 +359,11 @@ async function run() {
|
|
|
359
359
|
|
|
360
360
|
case 'remove':
|
|
361
361
|
case 'rm':
|
|
362
|
-
if (!
|
|
362
|
+
if (!args[0]) {
|
|
363
363
|
throw new Error('Specify a file path to remove.');
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
console.log(artifact.rm(
|
|
366
|
+
console.log(artifact.rm(args[0]));
|
|
367
367
|
|
|
368
368
|
break;
|
|
369
369
|
|
|
@@ -385,7 +385,7 @@ async function run() {
|
|
|
385
385
|
|
|
386
386
|
case 'help':
|
|
387
387
|
default:
|
|
388
|
-
console.log('Usage: art <command> [
|
|
388
|
+
console.log('Usage: art <command> [args]');
|
|
389
389
|
console.log('Available commands: init, clone, status, add, commit, branch, checkout, merge, remote, fetch, pull, push, log, diff, stash, reset, rm');
|
|
390
390
|
}
|
|
391
391
|
} catch (error) {
|
package/branching/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Artifact - Modern version control.
|
|
3
3
|
* @author Benny Schmidt (https://github.com/bennyschmidt)
|
|
4
4
|
* @project https://github.com/bennyschmidt/artifact
|
|
5
|
-
* Module: Branching (v0.3.
|
|
5
|
+
* Module: Branching (v0.3.4)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const fs = require('fs');
|
|
@@ -453,7 +453,7 @@ function merge (targetBranch) {
|
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
module.exports = {
|
|
456
|
-
__libraryVersion: '0.3.
|
|
456
|
+
__libraryVersion: '0.3.4',
|
|
457
457
|
__libraryAPIName: 'Branching',
|
|
458
458
|
branch,
|
|
459
459
|
checkout,
|
package/caches/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Artifact - Modern version control.
|
|
3
3
|
* @author Benny Schmidt (https://github.com/bennyschmidt)
|
|
4
4
|
* @project https://github.com/bennyschmidt/artifact
|
|
5
|
-
* Module: Caches (v0.3.
|
|
5
|
+
* Module: Caches (v0.3.4)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const fs = require('fs');
|
|
@@ -441,7 +441,7 @@ function rm (filePath) {
|
|
|
441
441
|
}
|
|
442
442
|
|
|
443
443
|
module.exports = {
|
|
444
|
-
__libraryVersion: '0.3.
|
|
444
|
+
__libraryVersion: '0.3.4',
|
|
445
445
|
__libraryAPIName: 'Caches',
|
|
446
446
|
stash,
|
|
447
447
|
reset,
|
package/changes/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Artifact - Modern version control.
|
|
3
3
|
* @author Benny Schmidt (https://github.com/bennyschmidt)
|
|
4
4
|
* @project https://github.com/bennyschmidt/artifact
|
|
5
|
-
* Module: Changes (v0.3.
|
|
5
|
+
* Module: Changes (v0.3.4)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const fs = require('fs');
|
|
@@ -200,7 +200,7 @@ function diff () {
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
module.exports = {
|
|
203
|
-
__libraryVersion: '0.3.
|
|
203
|
+
__libraryVersion: '0.3.4',
|
|
204
204
|
__libraryAPIName: 'Changes',
|
|
205
205
|
log,
|
|
206
206
|
diff
|
package/contributions/index.js
CHANGED
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* art - Modern version control.
|
|
3
|
-
* Core Library Entry Point (v0.3.
|
|
3
|
+
* Core Library Entry Point (v0.3.4)
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
const Setup = require('./setup');
|
|
@@ -50,7 +50,7 @@ const art = {
|
|
|
50
50
|
|
|
51
51
|
// Metadata
|
|
52
52
|
|
|
53
|
-
version: '0.3.
|
|
53
|
+
version: '0.3.4',
|
|
54
54
|
modules: [
|
|
55
55
|
Setup.__libraryAPIName,
|
|
56
56
|
Workflow.__libraryAPIName,
|
package/package.json
CHANGED
package/setup/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Artifact - Modern version control.
|
|
3
3
|
* @author Benny Schmidt (https://github.com/bennyschmidt)
|
|
4
4
|
* @project https://github.com/bennyschmidt/artifact
|
|
5
|
-
* Module: Utils / getStateByHash (v0.3.
|
|
5
|
+
* Module: Utils / getStateByHash (v0.3.4)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const fs = require('fs');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Artifact - Modern version control.
|
|
3
3
|
* @author Benny Schmidt (https://github.com/bennyschmidt)
|
|
4
4
|
* @project https://github.com/bennyschmidt/artifact
|
|
5
|
-
* Module: Utility / shouldIgnore (v0.3.
|
|
5
|
+
* Module: Utility / shouldIgnore (v0.3.4)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const fs = require('fs');
|
package/workflow/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Artifact - Modern version control.
|
|
3
3
|
* @author Benny Schmidt (https://github.com/bennyschmidt)
|
|
4
4
|
* @project https://github.com/bennyschmidt/artifact
|
|
5
|
-
* Module: Workflow (v0.3.
|
|
5
|
+
* Module: Workflow (v0.3.4)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const fs = require('fs');
|
|
@@ -426,7 +426,7 @@ function commit (message) {
|
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
module.exports = {
|
|
429
|
-
__libraryVersion: '0.3.
|
|
429
|
+
__libraryVersion: '0.3.4',
|
|
430
430
|
__libraryAPIName: 'Workflow',
|
|
431
431
|
status,
|
|
432
432
|
add,
|