@sprucelabs/spruce-skill-utils 32.1.4 → 32.1.6
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.
|
@@ -104,15 +104,19 @@ const diskUtil = {
|
|
|
104
104
|
throw new Error(`.spruce directory not found at ${cwd}`);
|
|
105
105
|
},
|
|
106
106
|
detectProjectLanguage(cwd) {
|
|
107
|
+
const isInTypescript = this.doesFileExist(this.resolvePath(cwd, 'tsconfig.json'));
|
|
108
|
+
if (isInTypescript) {
|
|
109
|
+
return 'ts';
|
|
110
|
+
}
|
|
107
111
|
const isInGoProject = this.doesDirExist(this.resolvePath(cwd, 'go.mod'));
|
|
108
112
|
if (isInGoProject) {
|
|
109
113
|
return 'go';
|
|
110
114
|
}
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
return '
|
|
115
|
+
const isInJsProject = this.doesFileExist(this.resolvePath(cwd, 'package.json'));
|
|
116
|
+
if (isInJsProject) {
|
|
117
|
+
return 'js';
|
|
114
118
|
}
|
|
115
|
-
return '
|
|
119
|
+
return 'unknown';
|
|
116
120
|
},
|
|
117
121
|
doesHashSprucePathExist(cwd, ...filePath) {
|
|
118
122
|
try {
|
|
@@ -98,15 +98,19 @@ const diskUtil = {
|
|
|
98
98
|
throw new Error(`.spruce directory not found at ${cwd}`);
|
|
99
99
|
},
|
|
100
100
|
detectProjectLanguage(cwd) {
|
|
101
|
+
const isInTypescript = this.doesFileExist(this.resolvePath(cwd, 'tsconfig.json'));
|
|
102
|
+
if (isInTypescript) {
|
|
103
|
+
return 'ts';
|
|
104
|
+
}
|
|
101
105
|
const isInGoProject = this.doesDirExist(this.resolvePath(cwd, 'go.mod'));
|
|
102
106
|
if (isInGoProject) {
|
|
103
107
|
return 'go';
|
|
104
108
|
}
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
107
|
-
return '
|
|
109
|
+
const isInJsProject = this.doesFileExist(this.resolvePath(cwd, 'package.json'));
|
|
110
|
+
if (isInJsProject) {
|
|
111
|
+
return 'js';
|
|
108
112
|
}
|
|
109
|
-
return '
|
|
113
|
+
return 'unknown';
|
|
110
114
|
},
|
|
111
115
|
doesHashSprucePathExist(cwd, ...filePath) {
|
|
112
116
|
try {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "32.1.
|
|
6
|
+
"version": "32.1.6",
|
|
7
7
|
"skill": {
|
|
8
8
|
"namespace": "skill-utils",
|
|
9
9
|
"upgradeIgnoreList": [
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@sprucelabs/globby": "^2.0.506",
|
|
61
|
-
"@sprucelabs/schema": "^32.3.
|
|
61
|
+
"@sprucelabs/schema": "^32.3.1",
|
|
62
62
|
"chalk": "^4.1.2",
|
|
63
63
|
"dotenv": "^17.2.3",
|
|
64
64
|
"fs-extra": "^11.3.2",
|