sn-typescript-util 1.5.1 → 1.5.2

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/README.md CHANGED
@@ -44,7 +44,7 @@ npm install -g sn-typescript-util
44
44
  Build the TypeScript and configuration files. This only needs to be done once for an application.
45
45
 
46
46
  ```bash
47
- snts --build
47
+ snts -b
48
48
  ```
49
49
 
50
50
  In the application directory created by the ServiceNow Extension for VS Code, the build creates a `ts` directory from the JavaScript files in the `src` directory. This is where all the TypeScript code resides and where the workflow begins.
@@ -59,7 +59,7 @@ After installation & setup, simply run the TypeScript compiler `--watch` command
59
59
  tsc --watch
60
60
  ```
61
61
 
62
- The TypeScript will get transpiled to ES5 (or other ECMAScript target) and moved to the `src` directory. Then changes are ready to sync with the target instance using the ServiceNow Extension for VS Code.
62
+ The TypeScript will get transpiled and moved to the `src` directory. Then changes are ready to sync with the target instance using the ServiceNow Extension for VS Code.
63
63
 
64
64
  **[Back to top](#table-of-contents)**
65
65
 
package/bin/snts.js CHANGED
@@ -20,7 +20,7 @@ async function addInterfaceFile() {
20
20
  'scripts/templates',
21
21
  'BaseTable.ts',
22
22
  'ts/Types',
23
- `${getConstants().confirmInterfaceMsg}`
23
+ `Add a ${cyan('BaseTable.ts')} interface with global default fields?`
24
24
  );
25
25
  }
26
26
  async function addPrettierFile() {
@@ -29,7 +29,7 @@ async function addPrettierFile() {
29
29
  'scripts/templates',
30
30
  '.prettierrc.json',
31
31
  null,
32
- `${getConstants().confirmPrettierMsg}`
32
+ `Add a ${cyan('.prettierrc.json')} default config?`
33
33
  );
34
34
  }
35
35
  async function confirmFile(msg) {
@@ -104,14 +104,6 @@ function getConstants() {
104
104
  Constants['projectName'] = 'SN TypeScript Util';
105
105
  Constants['projectDescription'] =
106
106
  'is a TS utility for ServiceNow developers using VS Code.';
107
- Constants[
108
- (Constants['confirmInterfaceMsg'] =
109
- `Add a ${cyan('BaseTable.ts')} interface with global default fields?`)
110
- ] = 'confirmInterfaceMsg';
111
- Constants[
112
- (Constants['confirmPrettierMsg'] =
113
- `Add a ${cyan('.prettierrc.json')} default config?`)
114
- ] = 'confirmPrettierMsg';
115
107
  Constants['errorMsg'] =
116
108
  'No active application detected. Please create a project with the ServiceNow Extension for VS Code.';
117
109
  Constants['docsUrl'] =
package/bun.lockb CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sn-typescript-util",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "A TypeScript utility for ServiceNow developers using VS Code",
5
5
  "bin": {
6
6
  "snts": "bin/snts.js"
@@ -26,16 +26,16 @@
26
26
  "dependencies": {
27
27
  "@clack/prompts": "^0.7.0",
28
28
  "colorette": "^2.0.20",
29
- "commander": "^12.0.0",
29
+ "commander": "^12.1.0",
30
30
  "execa": "^9.1.0",
31
31
  "typescript": "^5.4.5"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@eslint/js": "^9.3.0",
35
35
  "@types/commander": "^2.12.2",
36
- "bun-types": "^1.1.8",
36
+ "bun-types": "^1.1.9",
37
37
  "eslint": "^9.3.0",
38
38
  "prettier": "^3.2.5",
39
- "typescript-eslint": "^7.9.0"
39
+ "typescript-eslint": "^7.10.0"
40
40
  }
41
41
  }
package/scripts/snts.ts CHANGED
@@ -31,7 +31,7 @@ async function addInterfaceFile() {
31
31
  'scripts/templates',
32
32
  'BaseTable.ts',
33
33
  'ts/Types',
34
- `${getConstants().confirmInterfaceMsg}`
34
+ `Add a ${cyan('BaseTable.ts')} interface with global default fields?`
35
35
  );
36
36
  }
37
37
 
@@ -41,7 +41,7 @@ async function addPrettierFile() {
41
41
  'scripts/templates',
42
42
  '.prettierrc.json',
43
43
  null,
44
- `${getConstants().confirmPrettierMsg}`
44
+ `Add a ${cyan('.prettierrc.json')} default config?`
45
45
  );
46
46
  }
47
47
 
@@ -128,8 +128,6 @@ function getConstants() {
128
128
  enum Constants {
129
129
  projectName = 'SN TypeScript Util',
130
130
  projectDescription = 'is a TS utility for ServiceNow developers using VS Code.',
131
- confirmInterfaceMsg = `Add a ${cyan('BaseTable.ts')} interface with global default fields?`,
132
- confirmPrettierMsg = `Add a ${cyan('.prettierrc.json')} default config?`,
133
131
  errorMsg = 'No active application detected. Please create a project with the ServiceNow Extension for VS Code.',
134
132
  docsUrl = 'https://docs.servicenow.com/bundle/washingtondc-application-development/page/build/applications/task/create-project.html',
135
133
  buildOption = 'Build project utility files & package dependencies',