@servicetitan/startup 32.3.1 → 32.3.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/dist/cli/commands/eslint.d.ts +7 -0
- package/dist/cli/commands/eslint.d.ts.map +1 -1
- package/dist/cli/commands/eslint.js +28 -4
- package/dist/cli/commands/eslint.js.map +1 -1
- package/package.json +8 -6
- package/src/cli/commands/__tests__/eslint.test.ts +13 -0
- package/src/cli/commands/eslint.ts +12 -3
|
@@ -2,9 +2,16 @@ import { Command, CommandArgs } from './types';
|
|
|
2
2
|
interface Args extends CommandArgs {
|
|
3
3
|
_: string[];
|
|
4
4
|
fix?: boolean;
|
|
5
|
+
paths?: string[];
|
|
5
6
|
}
|
|
6
7
|
export declare class ESLintCommand extends Command<Args> {
|
|
8
|
+
static readonly options: {
|
|
9
|
+
_: {
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
7
13
|
execute(): Promise<void>;
|
|
14
|
+
private get paths();
|
|
8
15
|
}
|
|
9
16
|
export {};
|
|
10
17
|
//# sourceMappingURL=eslint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/eslint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/eslint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/C,UAAU,IAAK,SAAQ,WAAW;IAC9B,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,qBAAa,aAAc,SAAQ,OAAO,CAAC,IAAI,CAAC;IAC5C,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;MAErB;IAGI,OAAO;IAIb,OAAO,KAAK,KAAK,GAGhB;CACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */ "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
@@ -11,6 +11,19 @@ Object.defineProperty(exports, "ESLintCommand", {
|
|
|
11
11
|
const _utils = require("../../utils");
|
|
12
12
|
const _utils1 = require("../utils");
|
|
13
13
|
const _types = require("./types");
|
|
14
|
+
function _define_property(obj, key, value) {
|
|
15
|
+
if (key in obj) {
|
|
16
|
+
Object.defineProperty(obj, key, {
|
|
17
|
+
value: value,
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
obj[key] = value;
|
|
24
|
+
}
|
|
25
|
+
return obj;
|
|
26
|
+
}
|
|
14
27
|
function _ts_decorate(decorators, target, key, desc) {
|
|
15
28
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
29
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -22,13 +35,24 @@ function _ts_metadata(k, v) {
|
|
|
22
35
|
}
|
|
23
36
|
class ESLintCommand extends _types.Command {
|
|
24
37
|
async execute() {
|
|
25
|
-
const { _: paths, fix } = this.args;
|
|
26
38
|
await (0, _utils1.eslint)({
|
|
27
|
-
fix,
|
|
28
|
-
paths
|
|
39
|
+
fix: this.args.fix,
|
|
40
|
+
paths: this.paths
|
|
29
41
|
});
|
|
30
42
|
}
|
|
43
|
+
get paths() {
|
|
44
|
+
const { _, paths = [] } = this.args;
|
|
45
|
+
return [
|
|
46
|
+
..._,
|
|
47
|
+
...paths
|
|
48
|
+
];
|
|
49
|
+
}
|
|
31
50
|
}
|
|
51
|
+
_define_property(ESLintCommand, "options", {
|
|
52
|
+
_: {
|
|
53
|
+
description: '[paths...]'
|
|
54
|
+
}
|
|
55
|
+
});
|
|
32
56
|
_ts_decorate([
|
|
33
57
|
_utils.logErrors,
|
|
34
58
|
_ts_metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/eslint.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/eslint.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { logErrors } from '../../utils';\nimport { eslint } from '../utils';\nimport { Command, CommandArgs } from './types';\n\ninterface Args extends CommandArgs {\n _: string[];\n fix?: boolean;\n paths?: string[];\n}\n\nexport class ESLintCommand extends Command<Args> {\n static readonly options = {\n _: { description: '[paths...]' },\n };\n\n @logErrors\n async execute() {\n await eslint({ fix: this.args.fix, paths: this.paths });\n }\n\n private get paths() {\n const { _, paths = [] } = this.args;\n return [..._, ...paths];\n }\n}\n"],"names":["ESLintCommand","Command","execute","eslint","fix","args","paths","_","options","description"],"mappings":"AAAA,uDAAuD;;;;+BAW1CA;;;eAAAA;;;uBAVa;wBACH;uBACc;;;;;;;;;;;;;;;;;;;;;;;AAQ9B,MAAMA,sBAAsBC,cAAO;IAKtC,MACMC,UAAU;QACZ,MAAMC,IAAAA,cAAM,EAAC;YAAEC,KAAK,IAAI,CAACC,IAAI,CAACD,GAAG;YAAEE,OAAO,IAAI,CAACA,KAAK;QAAC;IACzD;IAEA,IAAYA,QAAQ;QAChB,MAAM,EAAEC,CAAC,EAAED,QAAQ,EAAE,EAAE,GAAG,IAAI,CAACD,IAAI;QACnC,OAAO;eAAIE;eAAMD;SAAM;IAC3B;AACJ;AAbI,iBADSN,eACOQ,WAAU;IACtBD,GAAG;QAAEE,aAAa;IAAa;AACnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/startup",
|
|
3
|
-
"version": "32.3.
|
|
3
|
+
"version": "32.3.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/startup",
|
|
6
6
|
"repository": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@jest/core": "~29.7.0",
|
|
39
39
|
"@jest/types": "~29.6.3",
|
|
40
40
|
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
|
|
41
|
-
"@servicetitan/eslint-config": "32.3.
|
|
42
|
-
"@servicetitan/stylelint-config": "32.3.
|
|
41
|
+
"@servicetitan/eslint-config": "32.3.2",
|
|
42
|
+
"@servicetitan/stylelint-config": "32.3.2",
|
|
43
43
|
"@svgr/webpack": "^8.1.0",
|
|
44
44
|
"@swc/cli": "^0.5.0",
|
|
45
45
|
"@swc/core": "1.13.5",
|
|
@@ -70,13 +70,14 @@
|
|
|
70
70
|
"less-loader": "~12.3.0",
|
|
71
71
|
"less-plugin-npm-import": "~2.1.0",
|
|
72
72
|
"lodash.memoize": "^4.1.2",
|
|
73
|
-
"memfs": "~4.
|
|
73
|
+
"memfs": "~4.50.0",
|
|
74
74
|
"mini-css-extract-plugin": "~2.9.4",
|
|
75
75
|
"moment-locales-webpack-plugin": "~1.2.0",
|
|
76
76
|
"multimatch": "~5.0.0",
|
|
77
77
|
"portfinder": "~1.0.38",
|
|
78
78
|
"postcss": "~8.5.6",
|
|
79
79
|
"prettier": "~3.6.2",
|
|
80
|
+
"rollup": "~4.49.0",
|
|
80
81
|
"sass": "~1.93.2",
|
|
81
82
|
"sass-loader": "~16.0.6",
|
|
82
83
|
"semver": "~7.7.3",
|
|
@@ -118,7 +119,8 @@
|
|
|
118
119
|
"jwa": [
|
|
119
120
|
"@progress/kendo-licensing@1.3.5 -> jsonwebtoken@9.0.2 -> jws@3.2.2 -> jwa@1.4.1",
|
|
120
121
|
"Forcing ^1.4.2 to fix Node v25 incompatibility in 1.4.1 (see https://github.com/auth0/node-jsonwebtoken/issues/992)"
|
|
121
|
-
]
|
|
122
|
+
],
|
|
123
|
+
"rollup": "Update/remove when https://github.com/rollup/rollup/issues/6168 is resolved"
|
|
122
124
|
},
|
|
123
125
|
"publishConfig": {
|
|
124
126
|
"access": "public"
|
|
@@ -126,5 +128,5 @@
|
|
|
126
128
|
"cli": {
|
|
127
129
|
"webpack": false
|
|
128
130
|
},
|
|
129
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "06eacdb0bdeb763f5aeead1437443d794aeb80b4"
|
|
130
132
|
}
|
|
@@ -16,4 +16,17 @@ describe(`[startup] ${ESLintCommand.name}`, () => {
|
|
|
16
16
|
|
|
17
17
|
expect(eslint).toHaveBeenCalledWith({ fix: args.fix, paths: args._ });
|
|
18
18
|
});
|
|
19
|
+
|
|
20
|
+
describe('with paths', () => {
|
|
21
|
+
beforeEach(() => (args.paths = ['bar.ts']));
|
|
22
|
+
|
|
23
|
+
test('appends paths to args', async () => {
|
|
24
|
+
await subject();
|
|
25
|
+
|
|
26
|
+
expect(eslint).toHaveBeenCalledWith({
|
|
27
|
+
fix: args.fix,
|
|
28
|
+
paths: [...args._, ...args.paths!],
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
});
|
|
19
32
|
});
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
1
2
|
import { logErrors } from '../../utils';
|
|
2
3
|
import { eslint } from '../utils';
|
|
3
4
|
import { Command, CommandArgs } from './types';
|
|
4
5
|
|
|
5
6
|
interface Args extends CommandArgs {
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
7
|
_: string[];
|
|
8
8
|
fix?: boolean;
|
|
9
|
+
paths?: string[];
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export class ESLintCommand extends Command<Args> {
|
|
13
|
+
static readonly options = {
|
|
14
|
+
_: { description: '[paths...]' },
|
|
15
|
+
};
|
|
16
|
+
|
|
12
17
|
@logErrors
|
|
13
18
|
async execute() {
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
await eslint({ fix: this.args.fix, paths: this.paths });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
private get paths() {
|
|
23
|
+
const { _, paths = [] } = this.args;
|
|
24
|
+
return [..._, ...paths];
|
|
16
25
|
}
|
|
17
26
|
}
|