spec-up-t 1.6.4 → 1.6.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-up-t",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"description": "Technical specification drafting tool that generates rich specification documents from markdown. Forked from https://github.com/decentralized-identity/spec-up by Daniel Buchner (https://github.com/csuwildcat)",
|
|
5
5
|
"main": "./index",
|
|
6
6
|
"repository": {
|
|
@@ -19,6 +19,9 @@ const defaultQuestions = [
|
|
|
19
19
|
{ field: 'title', prompt: 'Enter title', defaultValue: 'Spec-Up-T Starterpack' },
|
|
20
20
|
{ field: 'description', prompt: 'Enter description', defaultValue: 'Create technical specifications in markdown. Based on the original Spec-Up, extended with Terminology tooling' },
|
|
21
21
|
{ field: 'author', prompt: 'Enter author', defaultValue: 'Trust over IP Foundation' },
|
|
22
|
+
{ field: 'logo', prompt: 'Enter logo URL', defaultValue: 'https://raw.githubusercontent.com/trustoverip/spec-up-t/refs/heads/master/src/install-from-boilerplate/boilerplate/static/logo.svg' },
|
|
23
|
+
{ field: 'logo_link', prompt: 'Enter logo link URL', defaultValue: 'https://github.com/trustoverip/spec-up-t' },
|
|
24
|
+
{ field: 'favicon', prompt: 'Enter favicon URL', defaultValue: 'https://raw.githubusercontent.com/trustoverip/spec-up-t/refs/heads/master/src/install-from-boilerplate/boilerplate/static/favicon.ico' },
|
|
22
25
|
{ field: 'account', prompt: 'Enter account', defaultValue: 'trustoverip' },
|
|
23
26
|
{ field: 'repo', prompt: 'Enter repo', defaultValue: 'spec-up-t-starter-pack' }
|
|
24
27
|
];
|
package/src/utils/git-info.js
CHANGED
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
const { execSync } = require('child_process');
|
|
12
12
|
const Logger = require('./logger');
|
|
13
13
|
|
|
14
|
+
// Fixed PATH for security: only system directories, not user-writable
|
|
15
|
+
const FIXED_PATH = process.platform === 'win32'
|
|
16
|
+
? 'C:\\Windows\\system32;C:\\Windows'
|
|
17
|
+
: '/usr/bin:/bin:/usr/sbin:/sbin';
|
|
18
|
+
|
|
14
19
|
/**
|
|
15
20
|
* Gets the current Git branch name
|
|
16
21
|
*
|
|
@@ -21,7 +26,8 @@ function getCurrentBranch() {
|
|
|
21
26
|
const branch = execSync('git branch --show-current', {
|
|
22
27
|
encoding: 'utf8',
|
|
23
28
|
timeout: 5000,
|
|
24
|
-
stdio: ['pipe', 'pipe', 'pipe']
|
|
29
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
30
|
+
env: { ...process.env, PATH: FIXED_PATH }
|
|
25
31
|
}).trim();
|
|
26
32
|
|
|
27
33
|
if (branch) {
|
|
@@ -33,7 +39,8 @@ function getCurrentBranch() {
|
|
|
33
39
|
const head = execSync('git rev-parse --abbrev-ref HEAD', {
|
|
34
40
|
encoding: 'utf8',
|
|
35
41
|
timeout: 5000,
|
|
36
|
-
stdio: ['pipe', 'pipe', 'pipe']
|
|
42
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
43
|
+
env: { ...process.env, PATH: FIXED_PATH }
|
|
37
44
|
}).trim();
|
|
38
45
|
|
|
39
46
|
if (head && head !== 'HEAD') {
|