@servicetitan/install 39.3.0 → 40.1.0
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/index.js +6 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/install.d.ts +1 -0
- package/dist/cli/install.d.ts.map +1 -1
- package/dist/cli/install.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/package-manager/npm-package-manager.d.ts +2 -0
- package/dist/package-manager/npm-package-manager.d.ts.map +1 -1
- package/dist/package-manager/npm-package-manager.js +63 -4
- package/dist/package-manager/npm-package-manager.js.map +1 -1
- package/dist/package-manager/package-manager.d.ts +1 -0
- package/dist/package-manager/package-manager.d.ts.map +1 -1
- package/dist/package-manager/package-manager.js.map +1 -1
- package/dist/package-manager/pnpm-package-manager.d.ts +2 -0
- package/dist/package-manager/pnpm-package-manager.d.ts.map +1 -1
- package/dist/package-manager/pnpm-package-manager.js +40 -1
- package/dist/package-manager/pnpm-package-manager.js.map +1 -1
- package/dist/package-manager/utils/filter-trusted-scripts.d.ts +13 -0
- package/dist/package-manager/utils/filter-trusted-scripts.d.ts.map +1 -0
- package/dist/package-manager/utils/filter-trusted-scripts.js +42 -0
- package/dist/package-manager/utils/filter-trusted-scripts.js.map +1 -0
- package/dist/package-manager/utils/index.d.ts +2 -0
- package/dist/package-manager/utils/index.d.ts.map +1 -1
- package/dist/package-manager/utils/index.js +2 -0
- package/dist/package-manager/utils/index.js.map +1 -1
- package/dist/package-manager/utils/resolve-allow-scripts.d.ts +0 -1
- package/dist/package-manager/utils/resolve-allow-scripts.d.ts.map +1 -1
- package/dist/package-manager/utils/resolve-allow-scripts.js +3 -18
- package/dist/package-manager/utils/resolve-allow-scripts.js.map +1 -1
- package/dist/package-manager/utils/resolve-min-release-age.d.ts +6 -0
- package/dist/package-manager/utils/resolve-min-release-age.d.ts.map +1 -0
- package/dist/package-manager/utils/resolve-min-release-age.js +25 -0
- package/dist/package-manager/utils/resolve-min-release-age.js.map +1 -0
- package/dist/utils/audited-scripts.d.ts +8 -0
- package/dist/utils/audited-scripts.d.ts.map +1 -0
- package/dist/utils/audited-scripts.js +102 -0
- package/dist/utils/audited-scripts.js.map +1 -0
- package/dist/utils/get-packages-with-install-scripts.d.ts.map +1 -1
- package/dist/utils/get-packages-with-install-scripts.js +10 -14
- package/dist/utils/get-packages-with-install-scripts.js.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/version-compare.d.ts +2 -0
- package/dist/utils/version-compare.d.ts.map +1 -0
- package/dist/utils/version-compare.js +44 -0
- package/dist/utils/version-compare.js.map +1 -0
- package/dist/utils/warn-untrusted-install-scripts.d.ts +2 -1
- package/dist/utils/warn-untrusted-install-scripts.d.ts.map +1 -1
- package/dist/utils/warn-untrusted-install-scripts.js +18 -25
- package/dist/utils/warn-untrusted-install-scripts.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/index.ts +4 -0
- package/src/cli/install.ts +1 -0
- package/src/index.ts +9 -1
- package/src/package-manager/npm-package-manager.ts +89 -6
- package/src/package-manager/package-manager.ts +1 -0
- package/src/package-manager/pnpm-package-manager.ts +47 -1
- package/src/package-manager/utils/filter-trusted-scripts.ts +44 -0
- package/src/package-manager/utils/index.ts +2 -0
- package/src/package-manager/utils/resolve-allow-scripts.ts +0 -8
- package/src/package-manager/utils/resolve-min-release-age.ts +16 -0
- package/src/utils/audited-scripts.ts +92 -0
- package/src/utils/get-packages-with-install-scripts.ts +6 -10
- package/src/utils/index.ts +2 -0
- package/src/utils/version-compare.ts +34 -0
- package/src/utils/warn-untrusted-install-scripts.ts +26 -24
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AllowScripts } from '../package-manager';
|
|
2
|
-
export declare const DEFAULT_ALLOWED_SCRIPTS: string[];
|
|
3
2
|
export declare function resolveAllowScripts(value: AllowScripts, builtInAllowlist: string[]): AllowScripts;
|
|
4
3
|
//# sourceMappingURL=resolve-allow-scripts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-allow-scripts.d.ts","sourceRoot":"","sources":["../../../src/package-manager/utils/resolve-allow-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,
|
|
1
|
+
{"version":3,"file":"resolve-allow-scripts.d.ts","sourceRoot":"","sources":["../../../src/package-manager/utils/resolve-allow-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,YAAY,CAKjG"}
|
|
@@ -2,28 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
get DEFAULT_ALLOWED_SCRIPTS () {
|
|
13
|
-
return DEFAULT_ALLOWED_SCRIPTS;
|
|
14
|
-
},
|
|
15
|
-
get resolveAllowScripts () {
|
|
5
|
+
Object.defineProperty(exports, "resolveAllowScripts", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
16
8
|
return resolveAllowScripts;
|
|
17
9
|
}
|
|
18
10
|
});
|
|
19
11
|
const _parseallowscripts = require("./parse-allow-scripts");
|
|
20
|
-
const DEFAULT_ALLOWED_SCRIPTS = [
|
|
21
|
-
'@servicetitan/startup',
|
|
22
|
-
'cypress',
|
|
23
|
-
'msw',
|
|
24
|
-
'nx',
|
|
25
|
-
'tree-sitter'
|
|
26
|
-
];
|
|
27
12
|
function resolveAllowScripts(value, builtInAllowlist) {
|
|
28
13
|
if (value === true || value === false) {
|
|
29
14
|
return value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/package-manager/utils/resolve-allow-scripts.ts"],"sourcesContent":["import type { AllowScripts } from '../package-manager';\nimport { parseAllowScripts } from './parse-allow-scripts';\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../../src/package-manager/utils/resolve-allow-scripts.ts"],"sourcesContent":["import type { AllowScripts } from '../package-manager';\nimport { parseAllowScripts } from './parse-allow-scripts';\n\nexport function resolveAllowScripts(value: AllowScripts, builtInAllowlist: string[]): AllowScripts {\n if (value === true || value === false) {\n return value;\n }\n return [...builtInAllowlist, ...parseAllowScripts(value)];\n}\n"],"names":["resolveAllowScripts","value","builtInAllowlist","parseAllowScripts"],"mappings":";;;;+BAGgBA;;;eAAAA;;;mCAFkB;AAE3B,SAASA,oBAAoBC,KAAmB,EAAEC,gBAA0B;IAC/E,IAAID,UAAU,QAAQA,UAAU,OAAO;QACnC,OAAOA;IACX;IACA,OAAO;WAAIC;WAAqBC,IAAAA,oCAAiB,EAACF;KAAO;AAC7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-min-release-age.d.ts","sourceRoot":"","sources":["../../../src/package-manager/utils/resolve-min-release-age.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAChC,aAAa,EAAE,KAAK,GAAG,SAAS,GACjC,qBAAqB,GAAG,KAAK,CAK/B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "resolveMinReleaseAge", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return resolveMinReleaseAge;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const DEFAULT_MIN_RELEASE_AGE_DAYS = 3;
|
|
12
|
+
const DEFAULT_MIN_RELEASE_AGE_EXCLUDE = [
|
|
13
|
+
'@servicetitan/*'
|
|
14
|
+
];
|
|
15
|
+
function resolveMinReleaseAge(minReleaseAge) {
|
|
16
|
+
if (minReleaseAge === false) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
days: DEFAULT_MIN_RELEASE_AGE_DAYS,
|
|
21
|
+
exclude: DEFAULT_MIN_RELEASE_AGE_EXCLUDE
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=resolve-min-release-age.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/package-manager/utils/resolve-min-release-age.ts"],"sourcesContent":["const DEFAULT_MIN_RELEASE_AGE_DAYS = 3;\nconst DEFAULT_MIN_RELEASE_AGE_EXCLUDE = ['@servicetitan/*'];\n\nexport interface ResolvedMinReleaseAge {\n days: number;\n exclude: string[];\n}\n\nexport function resolveMinReleaseAge(\n minReleaseAge: false | undefined\n): ResolvedMinReleaseAge | false {\n if (minReleaseAge === false) {\n return false;\n }\n return { days: DEFAULT_MIN_RELEASE_AGE_DAYS, exclude: DEFAULT_MIN_RELEASE_AGE_EXCLUDE };\n}\n"],"names":["resolveMinReleaseAge","DEFAULT_MIN_RELEASE_AGE_DAYS","DEFAULT_MIN_RELEASE_AGE_EXCLUDE","minReleaseAge","days","exclude"],"mappings":";;;;+BAQgBA;;;eAAAA;;;AARhB,MAAMC,+BAA+B;AACrC,MAAMC,kCAAkC;IAAC;CAAkB;AAOpD,SAASF,qBACZG,aAAgC;IAEhC,IAAIA,kBAAkB,OAAO;QACzB,OAAO;IACX;IACA,OAAO;QAAEC,MAAMH;QAA8BI,SAASH;IAAgC;AAC1F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audited-scripts.d.ts","sourceRoot":"","sources":["../../src/utils/audited-scripts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,EAAE,aAAa,EAoF1C,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "AUDITED_SCRIPTS", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return AUDITED_SCRIPTS;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const AUDITED_SCRIPTS = [
|
|
12
|
+
// Trusted to run their install scripts, up to the audited version.
|
|
13
|
+
...[
|
|
14
|
+
{
|
|
15
|
+
name: '@servicetitan/startup',
|
|
16
|
+
note: 'Applies patch-package patches to installed dependencies'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'cypress',
|
|
20
|
+
maximumVersion: '16.1.1',
|
|
21
|
+
note: "Downloads Cypress's platform-specific test runner binary"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'msw',
|
|
25
|
+
maximumVersion: '3.0.1',
|
|
26
|
+
note: 'No install script at all since 3.0.0; worker regeneration moved to the manual `msw init` CLI command instead of running automatically on install. Ceiling bumped anyway to prevent audit workflow from flagging old version'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'nx',
|
|
30
|
+
maximumVersion: '23.2.1',
|
|
31
|
+
note: 'Verifies native platform support and updates the Nx Cloud client if the workspace uses Nx Cloud'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'tree-sitter',
|
|
35
|
+
maximumVersion: '0.25.1',
|
|
36
|
+
note: 'Installs a prebuilt native binary via node-gyp-build, compiling from source as a fallback'
|
|
37
|
+
}
|
|
38
|
+
].map((entry)=>({
|
|
39
|
+
...entry,
|
|
40
|
+
action: 'allow'
|
|
41
|
+
})),
|
|
42
|
+
// Have install scripts, but don't need them to function correctly.
|
|
43
|
+
...[
|
|
44
|
+
{
|
|
45
|
+
name: '@parcel/watcher',
|
|
46
|
+
note: 'Installs platform-specific binary via optionalDependencies, install script is a legacy fallback'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: '@progress/kendo-licensing',
|
|
50
|
+
note: 'Validates Kendo UI license key, not needed for functionality'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: '@scarf/scarf',
|
|
54
|
+
note: 'Sends anonymous analytics/telemetry to Scarf, usage-tracking mechanism with no functional purpose'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: '@swc/core',
|
|
58
|
+
note: 'Installs platform-specific binary via optionalDependencies, postinstall is a legacy fallback'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: '@tree-sitter-grammars/tree-sitter-yaml',
|
|
62
|
+
note: 'Ships prebuilds for all supported targets via node-gyp-build, install script is a source-compile fallback'
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: '@vaadin/vaadin-usage-statistics',
|
|
66
|
+
note: "Toggles Vaadin's development-time telemetry, no effect on functionality"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'contentful',
|
|
70
|
+
note: 'In 9.3.x, printed a message announcing that v10 was available, no functional purpose; no install script at all since 9.4.0'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'core-js-pure',
|
|
74
|
+
note: 'Prints a donation/sponsorship banner to the console, no functional purpose'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'core-js',
|
|
78
|
+
note: 'Prints a donation/sponsorship banner to the console, no functional purpose'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'es5-ext',
|
|
82
|
+
note: 'Displays politically motivated message targeted at Russian developers, no effect on functionality'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'esbuild',
|
|
86
|
+
note: 'Installs platform-specific binary via optionalDependencies, postinstall is a legacy fallback'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'tree-sitter-json',
|
|
90
|
+
note: 'Ships prebuilds for all supported targets via node-gyp-build, install script is a source-compile fallback'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'unrs-resolver',
|
|
94
|
+
note: 'Installs platform-specific binary via optionalDependencies, postinstall is a legacy fallback'
|
|
95
|
+
}
|
|
96
|
+
].map((entry)=>({
|
|
97
|
+
...entry,
|
|
98
|
+
action: 'ignore'
|
|
99
|
+
}))
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=audited-scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/audited-scripts.ts"],"sourcesContent":["export interface AuditedScript {\n name: string;\n action: 'allow' | 'ignore';\n maximumVersion?: string;\n note?: string;\n}\n\nexport const AUDITED_SCRIPTS: AuditedScript[] = [\n // Trusted to run their install scripts, up to the audited version.\n ...[\n {\n name: '@servicetitan/startup',\n note: 'Applies patch-package patches to installed dependencies',\n },\n {\n name: 'cypress',\n maximumVersion: '16.1.1',\n note: \"Downloads Cypress's platform-specific test runner binary\",\n },\n {\n name: 'msw',\n maximumVersion: '3.0.1',\n note: 'No install script at all since 3.0.0; worker regeneration moved to the manual `msw init` CLI command instead of running automatically on install. Ceiling bumped anyway to prevent audit workflow from flagging old version',\n },\n {\n name: 'nx',\n maximumVersion: '23.2.1',\n note: 'Verifies native platform support and updates the Nx Cloud client if the workspace uses Nx Cloud',\n },\n {\n name: 'tree-sitter',\n maximumVersion: '0.25.1',\n note: 'Installs a prebuilt native binary via node-gyp-build, compiling from source as a fallback',\n },\n ].map((entry: Omit<AuditedScript, 'action'>) => ({ ...entry, action: 'allow' as const })),\n\n // Have install scripts, but don't need them to function correctly.\n ...[\n {\n name: '@parcel/watcher',\n note: 'Installs platform-specific binary via optionalDependencies, install script is a legacy fallback',\n },\n {\n name: '@progress/kendo-licensing',\n note: 'Validates Kendo UI license key, not needed for functionality',\n },\n {\n name: '@scarf/scarf',\n note: 'Sends anonymous analytics/telemetry to Scarf, usage-tracking mechanism with no functional purpose',\n },\n {\n name: '@swc/core',\n note: 'Installs platform-specific binary via optionalDependencies, postinstall is a legacy fallback',\n },\n {\n name: '@tree-sitter-grammars/tree-sitter-yaml',\n note: 'Ships prebuilds for all supported targets via node-gyp-build, install script is a source-compile fallback',\n },\n {\n name: '@vaadin/vaadin-usage-statistics',\n note: \"Toggles Vaadin's development-time telemetry, no effect on functionality\",\n },\n {\n name: 'contentful',\n note: 'In 9.3.x, printed a message announcing that v10 was available, no functional purpose; no install script at all since 9.4.0',\n },\n {\n name: 'core-js-pure',\n note: 'Prints a donation/sponsorship banner to the console, no functional purpose',\n },\n {\n name: 'core-js',\n note: 'Prints a donation/sponsorship banner to the console, no functional purpose',\n },\n {\n name: 'es5-ext',\n note: 'Displays politically motivated message targeted at Russian developers, no effect on functionality',\n },\n {\n name: 'esbuild',\n note: 'Installs platform-specific binary via optionalDependencies, postinstall is a legacy fallback',\n },\n {\n name: 'tree-sitter-json',\n note: 'Ships prebuilds for all supported targets via node-gyp-build, install script is a source-compile fallback',\n },\n {\n name: 'unrs-resolver',\n note: 'Installs platform-specific binary via optionalDependencies, postinstall is a legacy fallback',\n },\n ].map((entry: Omit<AuditedScript, 'action'>) => ({ ...entry, action: 'ignore' as const })),\n];\n"],"names":["AUDITED_SCRIPTS","name","note","maximumVersion","map","entry","action"],"mappings":";;;;+BAOaA;;;eAAAA;;;AAAN,MAAMA,kBAAmC;IAC5C,mEAAmE;OAChE;QACC;YACIC,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNE,gBAAgB;YAChBD,MAAM;QACV;QACA;YACID,MAAM;YACNE,gBAAgB;YAChBD,MAAM;QACV;QACA;YACID,MAAM;YACNE,gBAAgB;YAChBD,MAAM;QACV;QACA;YACID,MAAM;YACNE,gBAAgB;YAChBD,MAAM;QACV;KACH,CAACE,GAAG,CAAC,CAACC,QAA0C,CAAA;YAAE,GAAGA,KAAK;YAAEC,QAAQ;QAAiB,CAAA;IAEtF,mEAAmE;OAChE;QACC;YACIL,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;QACA;YACID,MAAM;YACNC,MAAM;QACV;KACH,CAACE,GAAG,CAAC,CAACC,QAA0C,CAAA;YAAE,GAAGA,KAAK;YAAEC,QAAQ;QAAkB,CAAA;CAC1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-packages-with-install-scripts.d.ts","sourceRoot":"","sources":["../../src/utils/get-packages-with-install-scripts.ts"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AAWD,wBAAgB,6BAA6B,IAAI,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"get-packages-with-install-scripts.d.ts","sourceRoot":"","sources":["../../src/utils/get-packages-with-install-scripts.ts"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AAWD,wBAAgB,6BAA6B,IAAI,iBAAiB,EAAE,CAOnE"}
|
|
@@ -19,20 +19,16 @@ const _os = require("./os");
|
|
|
19
19
|
'postinstall'
|
|
20
20
|
].map((script)=>`:attr(scripts,[${script}])`).join(',');
|
|
21
21
|
function getPackagesWithInstallScripts() {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}));
|
|
33
|
-
} catch (unused) {
|
|
34
|
-
return [];
|
|
35
|
-
}
|
|
22
|
+
const result = (0, _os.runCommand)('npm', [
|
|
23
|
+
'query',
|
|
24
|
+
SELECTORS,
|
|
25
|
+
'--json'
|
|
26
|
+
]);
|
|
27
|
+
return JSON.parse(result).map(({ location, name, version })=>({
|
|
28
|
+
location,
|
|
29
|
+
name,
|
|
30
|
+
version
|
|
31
|
+
}));
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
//# sourceMappingURL=get-packages-with-install-scripts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/get-packages-with-install-scripts.ts"],"sourcesContent":["import { runCommand } from './os';\n\ninterface PackageWithScript {\n location: string;\n name: string;\n version: string;\n}\n\n/*\n * Keep this selector free of whitespace. On Windows npm runs through a shell (npm.CMD) and\n * execFileSync passes args unquoted, so a space would split the selector at the shell and npm\n * query would receive a truncated, invalid selector.\n */\nconst SELECTORS = ['preinstall', 'install', 'postinstall']\n .map(script => `:attr(scripts,[${script}])`)\n .join(',');\n\nexport function getPackagesWithInstallScripts(): PackageWithScript[] {\n
|
|
1
|
+
{"version":3,"sources":["../../src/utils/get-packages-with-install-scripts.ts"],"sourcesContent":["import { runCommand } from './os';\n\ninterface PackageWithScript {\n location: string;\n name: string;\n version: string;\n}\n\n/*\n * Keep this selector free of whitespace. On Windows npm runs through a shell (npm.CMD) and\n * execFileSync passes args unquoted, so a space would split the selector at the shell and npm\n * query would receive a truncated, invalid selector.\n */\nconst SELECTORS = ['preinstall', 'install', 'postinstall']\n .map(script => `:attr(scripts,[${script}])`)\n .join(',');\n\nexport function getPackagesWithInstallScripts(): PackageWithScript[] {\n const result = runCommand('npm', ['query', SELECTORS, '--json']);\n return JSON.parse(result).map(({ location, name, version }: PackageWithScript) => ({\n location,\n name,\n version,\n }));\n}\n"],"names":["getPackagesWithInstallScripts","SELECTORS","map","script","join","result","runCommand","JSON","parse","location","name","version"],"mappings":";;;;+BAiBgBA;;;eAAAA;;;oBAjBW;AAQ3B;;;;CAIC,GACD,MAAMC,YAAY;IAAC;IAAc;IAAW;CAAc,CACrDC,GAAG,CAACC,CAAAA,SAAU,CAAC,eAAe,EAAEA,OAAO,EAAE,CAAC,EAC1CC,IAAI,CAAC;AAEH,SAASJ;IACZ,MAAMK,SAASC,IAAAA,cAAU,EAAC,OAAO;QAAC;QAASL;QAAW;KAAS;IAC/D,OAAOM,KAAKC,KAAK,CAACH,QAAQH,GAAG,CAAC,CAAC,EAAEO,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAqB,GAAM,CAAA;YAC/EF;YACAC;YACAC;QACJ,CAAA;AACJ"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './audited-scripts';
|
|
1
2
|
export * from './ci';
|
|
2
3
|
export * from './debug';
|
|
3
4
|
export * from './find-up';
|
|
@@ -8,5 +9,6 @@ export * from './git';
|
|
|
8
9
|
export * from './npm';
|
|
9
10
|
export * from './os';
|
|
10
11
|
export * from './read-json';
|
|
12
|
+
export * from './version-compare';
|
|
11
13
|
export * from './warn-untrusted-install-scripts';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,qCAAqC,CAAC;AACpD,cAAc,eAAe,CAAC;AAC9B,cAAc,mCAAmC,CAAC;AAClD,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,MAAM,CAAC;AACrB,cAAc,aAAa,CAAC;AAC5B,cAAc,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,qCAAqC,CAAC;AACpD,cAAc,eAAe,CAAC;AAC9B,cAAc,mCAAmC,CAAC;AAClD,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,MAAM,CAAC;AACrB,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kCAAkC,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
+
_export_star(require("./audited-scripts"), exports);
|
|
5
6
|
_export_star(require("./ci"), exports);
|
|
6
7
|
_export_star(require("./debug"), exports);
|
|
7
8
|
_export_star(require("./find-up"), exports);
|
|
@@ -12,6 +13,7 @@ _export_star(require("./git"), exports);
|
|
|
12
13
|
_export_star(require("./npm"), exports);
|
|
13
14
|
_export_star(require("./os"), exports);
|
|
14
15
|
_export_star(require("./read-json"), exports);
|
|
16
|
+
_export_star(require("./version-compare"), exports);
|
|
15
17
|
_export_star(require("./warn-untrusted-install-scripts"), exports);
|
|
16
18
|
function _export_star(from, to) {
|
|
17
19
|
Object.keys(from).forEach(function(k) {
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './ci';\nexport * from './debug';\nexport * from './find-up';\nexport * from './get-packages-with-install-scripts';\nexport * from './get-version';\nexport * from './get-workspace-root-package-json';\nexport * from './git';\nexport * from './npm';\nexport * from './os';\nexport * from './read-json';\nexport * from './warn-untrusted-install-scripts';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './audited-scripts';\nexport * from './ci';\nexport * from './debug';\nexport * from './find-up';\nexport * from './get-packages-with-install-scripts';\nexport * from './get-version';\nexport * from './get-workspace-root-package-json';\nexport * from './git';\nexport * from './npm';\nexport * from './os';\nexport * from './read-json';\nexport * from './version-compare';\nexport * from './warn-untrusted-install-scripts';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-compare.d.ts","sourceRoot":"","sources":["../../src/utils/version-compare.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAwBhF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "versionCompare", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return versionCompare;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function versionCompare(version, otherVersion) {
|
|
12
|
+
const [versionCore, versionPrerelease] = splitPrerelease(version);
|
|
13
|
+
const [otherCore, otherPrerelease] = splitPrerelease(otherVersion);
|
|
14
|
+
const parts = parseVersion(versionCore);
|
|
15
|
+
const otherParts = parseVersion(otherCore);
|
|
16
|
+
const length = Math.max(parts.length, otherParts.length);
|
|
17
|
+
for(let i = 0; i < length; i++){
|
|
18
|
+
var _parts_i, _otherParts_i;
|
|
19
|
+
const part = (_parts_i = parts[i]) !== null && _parts_i !== void 0 ? _parts_i : 0;
|
|
20
|
+
const otherPart = (_otherParts_i = otherParts[i]) !== null && _otherParts_i !== void 0 ? _otherParts_i : 0;
|
|
21
|
+
if (part !== otherPart) {
|
|
22
|
+
return part > otherPart ? 1 : -1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/*
|
|
26
|
+
* Same core version: a pre-release build (e.g. "-canary.5") has lower
|
|
27
|
+
* precedence than the plain release it precedes.
|
|
28
|
+
*/ if (!!versionPrerelease === !!otherPrerelease) {
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
return versionPrerelease ? -1 : 1;
|
|
32
|
+
}
|
|
33
|
+
function splitPrerelease(version) {
|
|
34
|
+
const [core, ...prerelease] = version.trim().split('-');
|
|
35
|
+
return [
|
|
36
|
+
core,
|
|
37
|
+
prerelease.length > 0 ? prerelease.join('-') : undefined
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
function parseVersion(version) {
|
|
41
|
+
return version.split('.').map((part)=>parseInt(part, 10) || 0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=version-compare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/version-compare.ts"],"sourcesContent":["export function versionCompare(version: string, otherVersion: string): -1 | 0 | 1 {\n const [versionCore, versionPrerelease] = splitPrerelease(version);\n const [otherCore, otherPrerelease] = splitPrerelease(otherVersion);\n\n const parts = parseVersion(versionCore);\n const otherParts = parseVersion(otherCore);\n\n const length = Math.max(parts.length, otherParts.length);\n for (let i = 0; i < length; i++) {\n const part = parts[i] ?? 0;\n const otherPart = otherParts[i] ?? 0;\n if (part !== otherPart) {\n return part > otherPart ? 1 : -1;\n }\n }\n\n /*\n * Same core version: a pre-release build (e.g. \"-canary.5\") has lower\n * precedence than the plain release it precedes.\n */\n if (!!versionPrerelease === !!otherPrerelease) {\n return 0;\n }\n return versionPrerelease ? -1 : 1;\n}\n\nfunction splitPrerelease(version: string): [core: string, prerelease: string | undefined] {\n const [core, ...prerelease] = version.trim().split('-');\n return [core, prerelease.length > 0 ? prerelease.join('-') : undefined];\n}\n\nfunction parseVersion(version: string): number[] {\n return version.split('.').map(part => parseInt(part, 10) || 0);\n}\n"],"names":["versionCompare","version","otherVersion","versionCore","versionPrerelease","splitPrerelease","otherCore","otherPrerelease","parts","parseVersion","otherParts","length","Math","max","i","part","otherPart","core","prerelease","trim","split","join","undefined","map","parseInt"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA,eAAeC,OAAe,EAAEC,YAAoB;IAChE,MAAM,CAACC,aAAaC,kBAAkB,GAAGC,gBAAgBJ;IACzD,MAAM,CAACK,WAAWC,gBAAgB,GAAGF,gBAAgBH;IAErD,MAAMM,QAAQC,aAAaN;IAC3B,MAAMO,aAAaD,aAAaH;IAEhC,MAAMK,SAASC,KAAKC,GAAG,CAACL,MAAMG,MAAM,EAAED,WAAWC,MAAM;IACvD,IAAK,IAAIG,IAAI,GAAGA,IAAIH,QAAQG,IAAK;YAChBN,UACKE;QADlB,MAAMK,QAAOP,WAAAA,KAAK,CAACM,EAAE,cAARN,sBAAAA,WAAY;QACzB,MAAMQ,aAAYN,gBAAAA,UAAU,CAACI,EAAE,cAAbJ,2BAAAA,gBAAiB;QACnC,IAAIK,SAASC,WAAW;YACpB,OAAOD,OAAOC,YAAY,IAAI,CAAC;QACnC;IACJ;IAEA;;;KAGC,GACD,IAAI,CAAC,CAACZ,sBAAsB,CAAC,CAACG,iBAAiB;QAC3C,OAAO;IACX;IACA,OAAOH,oBAAoB,CAAC,IAAI;AACpC;AAEA,SAASC,gBAAgBJ,OAAe;IACpC,MAAM,CAACgB,MAAM,GAAGC,WAAW,GAAGjB,QAAQkB,IAAI,GAAGC,KAAK,CAAC;IACnD,OAAO;QAACH;QAAMC,WAAWP,MAAM,GAAG,IAAIO,WAAWG,IAAI,CAAC,OAAOC;KAAU;AAC3E;AAEA,SAASb,aAAaR,OAAe;IACjC,OAAOA,QAAQmB,KAAK,CAAC,KAAKG,GAAG,CAACR,CAAAA,OAAQS,SAAST,MAAM,OAAO;AAChE"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AuditedScript } from './audited-scripts';
|
|
2
|
+
export declare function warnUntrustedInstallScripts(allowedScripts: string[], ignored: AuditedScript[]): void;
|
|
2
3
|
//# sourceMappingURL=warn-untrusted-install-scripts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warn-untrusted-install-scripts.d.ts","sourceRoot":"","sources":["../../src/utils/warn-untrusted-install-scripts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"warn-untrusted-install-scripts.d.ts","sourceRoot":"","sources":["../../src/utils/warn-untrusted-install-scripts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIvD,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,QAsC7F"}
|
|
@@ -9,31 +9,24 @@ Object.defineProperty(exports, "warnUntrustedInstallScripts", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _getpackageswithinstallscripts = require("./get-packages-with-install-scripts");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const packages = (0, _getpackageswithinstallscripts.getPackagesWithInstallScripts)();
|
|
31
|
-
const trustedOrIgnored = new Set([
|
|
32
|
-
...allowedScripts,
|
|
33
|
-
...IGNORE
|
|
34
|
-
]);
|
|
35
|
-
const untrusted = packages.filter(({ location, name })=>{
|
|
36
|
-
return !!location && !trustedOrIgnored.has(name);
|
|
12
|
+
const _versioncompare = require("./version-compare");
|
|
13
|
+
function warnUntrustedInstallScripts(allowedScripts, ignored) {
|
|
14
|
+
let packages;
|
|
15
|
+
try {
|
|
16
|
+
packages = (0, _getpackageswithinstallscripts.getPackagesWithInstallScripts)();
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.warn(`WARNING: Unable to check for untrusted install scripts: ${error}`);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const untrusted = packages.filter(({ location, name, version })=>{
|
|
22
|
+
if (!location || allowedScripts.includes(name) || allowedScripts.includes(`${name}@${version}`)) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
const ignoredEntry = ignored.find((entry)=>entry.name === name);
|
|
26
|
+
if (!ignoredEntry) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return !!ignoredEntry.maximumVersion && (0, _versioncompare.versionCompare)(version, ignoredEntry.maximumVersion) > 0;
|
|
37
30
|
});
|
|
38
31
|
if (untrusted.length === 0) {
|
|
39
32
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/warn-untrusted-install-scripts.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport { getPackagesWithInstallScripts } from './get-packages-with-install-scripts';\
|
|
1
|
+
{"version":3,"sources":["../../src/utils/warn-untrusted-install-scripts.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport type { AuditedScript } from './audited-scripts';\nimport { getPackagesWithInstallScripts } from './get-packages-with-install-scripts';\nimport { versionCompare } from './version-compare';\n\nexport function warnUntrustedInstallScripts(allowedScripts: string[], ignored: AuditedScript[]) {\n let packages: ReturnType<typeof getPackagesWithInstallScripts>;\n try {\n packages = getPackagesWithInstallScripts();\n } catch (error) {\n console.warn(`WARNING: Unable to check for untrusted install scripts: ${error}`);\n return;\n }\n const untrusted = packages.filter(({ location, name, version }) => {\n if (\n !location ||\n allowedScripts.includes(name) ||\n allowedScripts.includes(`${name}@${version}`)\n ) {\n return false;\n }\n const ignoredEntry = ignored.find(entry => entry.name === name);\n if (!ignoredEntry) {\n return true;\n }\n return (\n !!ignoredEntry.maximumVersion &&\n versionCompare(version, ignoredEntry.maximumVersion) > 0\n );\n });\n\n if (untrusted.length === 0) {\n return;\n }\n\n const list = untrusted.map(({ name, version }) => ` - ${name}@${version}`).join('\\n');\n console.warn(\n [\n 'WARNING: The following packages have untrusted install scripts.',\n 'Review and add trusted packages to --allow-scripts:',\n list,\n ].join('\\n')\n );\n}\n"],"names":["warnUntrustedInstallScripts","allowedScripts","ignored","packages","getPackagesWithInstallScripts","error","console","warn","untrusted","filter","location","name","version","includes","ignoredEntry","find","entry","maximumVersion","versionCompare","length","list","map","join"],"mappings":"AAAA,6BAA6B;;;;+BAKbA;;;eAAAA;;;+CAH8B;gCACf;AAExB,SAASA,4BAA4BC,cAAwB,EAAEC,OAAwB;IAC1F,IAAIC;IACJ,IAAI;QACAA,WAAWC,IAAAA,4DAA6B;IAC5C,EAAE,OAAOC,OAAO;QACZC,QAAQC,IAAI,CAAC,CAAC,wDAAwD,EAAEF,OAAO;QAC/E;IACJ;IACA,MAAMG,YAAYL,SAASM,MAAM,CAAC,CAAC,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAE;QAC1D,IACI,CAACF,YACDT,eAAeY,QAAQ,CAACF,SACxBV,eAAeY,QAAQ,CAAC,GAAGF,KAAK,CAAC,EAAEC,SAAS,GAC9C;YACE,OAAO;QACX;QACA,MAAME,eAAeZ,QAAQa,IAAI,CAACC,CAAAA,QAASA,MAAML,IAAI,KAAKA;QAC1D,IAAI,CAACG,cAAc;YACf,OAAO;QACX;QACA,OACI,CAAC,CAACA,aAAaG,cAAc,IAC7BC,IAAAA,8BAAc,EAACN,SAASE,aAAaG,cAAc,IAAI;IAE/D;IAEA,IAAIT,UAAUW,MAAM,KAAK,GAAG;QACxB;IACJ;IAEA,MAAMC,OAAOZ,UAAUa,GAAG,CAAC,CAAC,EAAEV,IAAI,EAAEC,OAAO,EAAE,GAAK,CAAC,IAAI,EAAED,KAAK,CAAC,EAAEC,SAAS,EAAEU,IAAI,CAAC;IACjFhB,QAAQC,IAAI,CACR;QACI;QACA;QACAa;KACH,CAACE,IAAI,CAAC;AAEf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/install",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "40.1.0",
|
|
4
4
|
"description": "Lightweight wrapper around npm install that configures access to private packages",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/uikit/install",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"webpack": false
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"js-yaml": "~5.4.
|
|
33
|
+
"js-yaml": "~5.4.2"
|
|
34
34
|
},
|
|
35
35
|
"peerDependenciesMeta": {
|
|
36
36
|
"js-yaml": {
|
package/src/cli/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ const args = (function getArgs() {
|
|
|
11
11
|
'no-allow-scripts': { type: 'boolean' },
|
|
12
12
|
'allow-all-scripts': { type: 'boolean' },
|
|
13
13
|
'fix': { type: 'boolean' },
|
|
14
|
+
'no-min-release-age': { type: 'boolean' },
|
|
14
15
|
'quiet': { type: 'boolean' },
|
|
15
16
|
'token': { type: 'boolean' },
|
|
16
17
|
'no-token': { type: 'boolean' },
|
|
@@ -35,6 +36,9 @@ const args = (function getArgs() {
|
|
|
35
36
|
case 'allow-all-scripts':
|
|
36
37
|
result.allowScripts = true;
|
|
37
38
|
break;
|
|
39
|
+
case 'no-min-release-age':
|
|
40
|
+
result.minReleaseAge = false;
|
|
41
|
+
break;
|
|
38
42
|
case 'no-token':
|
|
39
43
|
result.token = false;
|
|
40
44
|
break;
|
package/src/cli/install.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
export { PackageManager, getPackageManager } from './package-manager';
|
|
2
2
|
export type { DeclaredVersionQuery, ResolvedVersionQuery } from './package-manager';
|
|
3
|
-
export {
|
|
3
|
+
export {
|
|
4
|
+
AUDITED_SCRIPTS,
|
|
5
|
+
gitCloneRepo,
|
|
6
|
+
gitIsReachable,
|
|
7
|
+
isCI,
|
|
8
|
+
npmWhoAmI,
|
|
9
|
+
versionCompare,
|
|
10
|
+
} from './utils';
|
|
11
|
+
export type { AuditedScript } from './utils';
|