@servicetitan/startup 32.0.0 → 32.0.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-os.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/cli-os.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,iCAAiC,EAEjC,wBAAwB,EAC3B,MAAM,eAAe,CAAC;AAGvB,KAAK,iBAAiB,GAAG,wBAAwB,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAExE,eAAO,MAAM,UAAU,GACnB,SAAS,MAAM,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE,EACpC,6BAA4B,iBAAsB,KACnD,OAAO,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"cli-os.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/cli-os.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,iCAAiC,EAEjC,wBAAwB,EAC3B,MAAM,eAAe,CAAC;AAGvB,KAAK,iBAAiB,GAAG,wBAAwB,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAExE,eAAO,MAAM,UAAU,GACnB,SAAS,MAAM,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE,EACpC,6BAA4B,iBAAsB,KACnD,OAAO,CAAC,IAAI,CA8Cd,CAAC;AAEF,KAAK,uBAAuB,GAAG,iCAAiC,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEvF,eAAO,MAAM,gBAAgB,GACzB,SAAS,MAAM,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE,EACpC,gCAA+B,uBAA4B,KAC5D,MA2BF,CAAC"}
|
package/dist/cli/utils/cli-os.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/utils/cli-os.ts"],"sourcesContent":["import {\n execSync,\n ExecSyncOptionsWithBufferEncoding,\n spawn,\n SpawnOptionsWithoutStdio,\n} from 'child_process';\nimport { log } from '../../utils';\n\ntype RunCommandOptions = SpawnOptionsWithoutStdio & { quiet?: boolean };\n\nexport const runCommand = (\n command: string | (string | false)[],\n { quiet, ...spawnOptions }: RunCommandOptions = {}\n): Promise<void> => {\n return new Promise((resolve, reject) => {\n const commandArray: string[] = Array.isArray(command)\n ? command\n .filter(c => !!c)\n .map(c => c.toString())\n .join(' ')\n .split(' ')\n : command.split(' ');\n const fullCommand = commandArray.join(' ');\n\n const commandName = commandArray.shift();\n\n if (!commandName) {\n reject(new Error('invalid command'));\n\n return;\n }\n\n if (!quiet) {\n log.info(`Running: ${fullCommand}`);\n }\n\n const proc = spawn(commandName, commandArray, {\n shell: process.platform === 'win32',\n ...spawnOptions,\n });\n\n proc.stdout.pipe(process.stdout);\n proc.stderr.pipe(process.stderr);\n\n proc.on('exit', function (code
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/cli-os.ts"],"sourcesContent":["import {\n execSync,\n ExecSyncOptionsWithBufferEncoding,\n spawn,\n SpawnOptionsWithoutStdio,\n} from 'child_process';\nimport { log } from '../../utils';\n\ntype RunCommandOptions = SpawnOptionsWithoutStdio & { quiet?: boolean };\n\nexport const runCommand = (\n command: string | (string | false)[],\n { quiet, ...spawnOptions }: RunCommandOptions = {}\n): Promise<void> => {\n return new Promise((resolve, reject) => {\n const commandArray: string[] = Array.isArray(command)\n ? command\n .filter(c => !!c)\n .map(c => c.toString())\n .join(' ')\n .split(' ')\n : command.split(' ');\n const fullCommand = commandArray.join(' ');\n\n const commandName = commandArray.shift();\n\n if (!commandName) {\n reject(new Error('invalid command'));\n\n return;\n }\n\n if (!quiet) {\n log.info(`Running: ${fullCommand}`);\n }\n\n const proc = spawn(commandName, commandArray, {\n shell: process.platform === 'win32',\n ...spawnOptions,\n });\n\n proc.stdout.pipe(process.stdout);\n proc.stderr.pipe(process.stderr);\n\n proc.on('exit', function (code) {\n if (!quiet) {\n log.info(`command finished with code ${code}`, fullCommand);\n }\n\n if (code) {\n reject(new Error(`command exited with code: ${code}`));\n } else {\n resolve();\n }\n });\n proc.on('error', function (e) {\n reject(e);\n });\n });\n};\n\ntype RunCommandOutputOptions = ExecSyncOptionsWithBufferEncoding & { quiet?: boolean };\n\nexport const runCommandOutput = (\n command: string | (string | false)[],\n { quiet, ...execSyncOptions }: RunCommandOutputOptions = {}\n): string => {\n const commandArray: string[] = Array.isArray(command)\n ? command\n .filter(c => !!c)\n .map(c => c.toString())\n .join(' ')\n .split(' ')\n : command.split(' ');\n const fullCommand = commandArray.join(' ');\n\n const commandName = commandArray.shift();\n\n if (!commandName) {\n throw new Error();\n }\n\n if (!quiet) {\n log.info(`Running: ${fullCommand}`);\n }\n\n const result = execSync(fullCommand, execSyncOptions).toString();\n\n if (!quiet) {\n log.info('command finished', result);\n }\n\n return result;\n};\n"],"names":["runCommand","runCommandOutput","command","quiet","spawnOptions","Promise","resolve","reject","commandArray","Array","isArray","filter","c","map","toString","join","split","fullCommand","commandName","shift","Error","log","info","proc","spawn","shell","process","platform","stdout","pipe","stderr","on","code","e","execSyncOptions","result","execSync"],"mappings":";;;;;;;;;;;QAUaA;eAAAA;;QAqDAC;eAAAA;;;+BA1DN;uBACa;AAIb,MAAMD,aAAa,CACtBE,SACA,EAAEC,KAAK,EAAE,GAAGC,cAAiC,GAAG,CAAC,CAAC;IAElD,OAAO,IAAIC,QAAQ,CAACC,SAASC;QACzB,MAAMC,eAAyBC,MAAMC,OAAO,CAACR,WACvCA,QACKS,MAAM,CAACC,CAAAA,IAAK,CAAC,CAACA,GACdC,GAAG,CAACD,CAAAA,IAAKA,EAAEE,QAAQ,IACnBC,IAAI,CAAC,KACLC,KAAK,CAAC,OACXd,QAAQc,KAAK,CAAC;QACpB,MAAMC,cAAcT,aAAaO,IAAI,CAAC;QAEtC,MAAMG,cAAcV,aAAaW,KAAK;QAEtC,IAAI,CAACD,aAAa;Y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nB,aAAaiB,iBAAiBpB,QAAQ;IAE9D,IAAI,CAACX,OAAO;QACRkB,UAAG,CAACC,IAAI,CAAC,oBAAoBa;IACjC;IAEA,OAAOA;AACX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/startup",
|
|
3
|
-
"version": "32.0.
|
|
3
|
+
"version": "32.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/startup",
|
|
6
6
|
"repository": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@jest/core": "~29.7.0",
|
|
38
38
|
"@jest/types": "~29.6.3",
|
|
39
39
|
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
|
|
40
|
-
"@servicetitan/eslint-config": "32.0.
|
|
41
|
-
"@servicetitan/stylelint-config": "32.0.
|
|
40
|
+
"@servicetitan/eslint-config": "32.0.1",
|
|
41
|
+
"@servicetitan/stylelint-config": "32.0.1",
|
|
42
42
|
"@svgr/webpack": "^8.1.0",
|
|
43
43
|
"@swc/cli": "^0.5.0",
|
|
44
44
|
"@swc/core": "1.13.5",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"cli": {
|
|
121
121
|
"webpack": false
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "2b74dd72d39c2023151699d1cf7a6e6130d64279"
|
|
124
124
|
}
|
package/src/cli/utils/cli-os.ts
CHANGED
|
@@ -42,7 +42,7 @@ export const runCommand = (
|
|
|
42
42
|
proc.stdout.pipe(process.stdout);
|
|
43
43
|
proc.stderr.pipe(process.stderr);
|
|
44
44
|
|
|
45
|
-
proc.on('exit', function (code
|
|
45
|
+
proc.on('exit', function (code) {
|
|
46
46
|
if (!quiet) {
|
|
47
47
|
log.info(`command finished with code ${code}`, fullCommand);
|
|
48
48
|
}
|
|
@@ -53,6 +53,9 @@ export const runCommand = (
|
|
|
53
53
|
resolve();
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
+
proc.on('error', function (e) {
|
|
57
|
+
reject(e);
|
|
58
|
+
});
|
|
56
59
|
});
|
|
57
60
|
};
|
|
58
61
|
|