sn-typescript-util 1.2.5 → 1.2.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.
- package/.eslintrc.yml +5 -0
- package/bin/snts.js +3 -3
- package/package.json +10 -5
- package/scripts/snts.ts +3 -3
- package/templates/tsconfig.json +1 -2
package/.eslintrc.yml
ADDED
package/bin/snts.js
CHANGED
|
@@ -48,8 +48,8 @@ async function doSync() {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
function getErrorMsg() {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
const url = `https://docs.servicenow.com/bundle/vancouver-application-development/page/build/applications/task/create-project.html`;
|
|
52
|
+
const msg = `No active application detected. Please create a project with the ServiceNow Extension for VS Code.\n\n${url}`;
|
|
53
53
|
return console.error(bold(red(msg)));
|
|
54
54
|
}
|
|
55
55
|
function getFilePath(file, dir = 'scripts') {
|
|
@@ -66,7 +66,7 @@ function getWorkspace() {
|
|
|
66
66
|
async function hasApplication() {
|
|
67
67
|
try {
|
|
68
68
|
const workspace = await getWorkspace();
|
|
69
|
-
|
|
69
|
+
const app = workspace.ACTIVE_APPLICATION;
|
|
70
70
|
return Object.entries(app).length === 0 ? getErrorMsg() : true;
|
|
71
71
|
} catch (e) {
|
|
72
72
|
getErrorMsg();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sn-typescript-util",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "A TypeScript utility for ServiceNow developers using VS Code",
|
|
5
5
|
"bin": {
|
|
6
6
|
"snts": "bin/snts.js"
|
|
@@ -23,14 +23,19 @@
|
|
|
23
23
|
},
|
|
24
24
|
"type": "module",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@clack/prompts": "^0.
|
|
27
|
-
"@types/node": "^20.
|
|
26
|
+
"@clack/prompts": "^0.7.0",
|
|
27
|
+
"@types/node": "^20.5.9",
|
|
28
28
|
"@types/servicenow": "^10.0.1",
|
|
29
29
|
"colorette": "^2.0.20",
|
|
30
30
|
"commander": "^11.0.0",
|
|
31
31
|
"nodemon": "^3.0.1",
|
|
32
32
|
"npm-add-script": "^1.1.0",
|
|
33
|
-
"prettier": "^3.0.
|
|
34
|
-
"typescript": "^5.
|
|
33
|
+
"prettier": "^3.0.3",
|
|
34
|
+
"typescript": "^5.2.2"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^6.5.0",
|
|
38
|
+
"@typescript-eslint/parser": "^6.5.0",
|
|
39
|
+
"eslint": "^8.48.0"
|
|
35
40
|
}
|
|
36
41
|
}
|
package/scripts/snts.ts
CHANGED
|
@@ -55,8 +55,8 @@ async function doSync() {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
function getErrorMsg() {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
const url: string = `https://docs.servicenow.com/bundle/vancouver-application-development/page/build/applications/task/create-project.html`;
|
|
59
|
+
const msg: string = `No active application detected. Please create a project with the ServiceNow Extension for VS Code.\n\n${url}`;
|
|
60
60
|
return console.error(bold(red(msg)));
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -77,7 +77,7 @@ function getWorkspace() {
|
|
|
77
77
|
async function hasApplication() {
|
|
78
78
|
try {
|
|
79
79
|
const workspace: Workspace = await getWorkspace();
|
|
80
|
-
|
|
80
|
+
const app: string = workspace.ACTIVE_APPLICATION;
|
|
81
81
|
return Object.entries(app).length === 0 ? getErrorMsg() : true;
|
|
82
82
|
} catch (e) {
|
|
83
83
|
getErrorMsg();
|