license-cop 1.3.0 → 1.4.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/package.json +5 -8
- package/src/index.d.ts +1 -1
- package/src/index.js +22 -8
- package/src/index.js.map +1 -1
- package/src/lib/cli/commands/init.js +9 -5
- package/src/lib/cli/commands/init.js.map +1 -1
- package/src/lib/cli/commands/main.js +16 -14
- package/src/lib/cli/commands/main.js.map +1 -1
- package/src/lib/cli/commands/version.js +7 -5
- package/src/lib/cli/commands/version.js.map +1 -1
- package/src/lib/cli/create-command.js +6 -4
- package/src/lib/cli/create-command.js.map +1 -1
- package/src/lib/cli/index.js +4 -2
- package/src/lib/cli/index.js.map +1 -1
- package/src/lib/cli/report-failure.js +6 -4
- package/src/lib/cli/report-failure.js.map +1 -1
- package/src/lib/cli/report-success.js +4 -2
- package/src/lib/cli/report-success.js.map +1 -1
- package/src/lib/config/config-error.js +3 -1
- package/src/lib/config/config-error.js.map +1 -1
- package/src/lib/config/config.js +10 -6
- package/src/lib/config/config.js.map +1 -1
- package/src/lib/config/find-config.js +5 -3
- package/src/lib/config/find-config.js.map +1 -1
- package/src/lib/config/load-config.js +8 -6
- package/src/lib/config/load-config.js.map +1 -1
- package/src/lib/config/load-parent-config.js +6 -4
- package/src/lib/config/load-parent-config.js.map +1 -1
- package/src/lib/config/parent-resolutions/github.js +8 -6
- package/src/lib/config/parent-resolutions/github.js.map +1 -1
- package/src/lib/config/parent-resolutions/http.js +3 -1
- package/src/lib/config/parent-resolutions/http.js.map +1 -1
- package/src/lib/config/parent-resolutions/npm.js +8 -4
- package/src/lib/config/parent-resolutions/npm.js.map +1 -1
- package/src/lib/config/parsers/json5.js +3 -1
- package/src/lib/config/parsers/json5.js.map +1 -1
- package/src/lib/license-cop.js +15 -13
- package/src/lib/license-cop.js.map +1 -1
- package/src/lib/logger.js +3 -1
- package/src/lib/logger.js.map +1 -1
- package/src/lib/package-json.d.ts +18 -3
- package/src/lib/package-json.js +19 -8
- package/src/lib/package-json.js.map +1 -1
- package/src/lib/package-rules.js +5 -3
- package/src/lib/package-rules.js.map +1 -1
- package/src/lib/spdx/calculate-issues.js +3 -1
- package/src/lib/spdx/calculate-issues.js.map +1 -1
- package/src/lib/spdx/get-tokens.js +3 -1
- package/src/lib/spdx/get-tokens.js.map +1 -1
- package/src/lib/spdx/parse-license-expression.js +7 -5
- package/src/lib/spdx/parse-license-expression.js.map +1 -1
- package/src/lib/spdx/parse-tokens.js +3 -1
- package/src/lib/spdx/parse-tokens.js.map +1 -1
- package/src/lib/spdx/types/token.js +6 -2
- package/src/lib/spdx/types/token.js.map +1 -1
- package/src/lib/utils/join-string-array.js +3 -1
- package/src/lib/utils/join-string-array.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "license-cop",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"bin": {
|
|
6
6
|
"license-cop": "./src/bin/license-cop"
|
|
@@ -33,16 +33,13 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@commander-js/extra-typings": "^11.0.0",
|
|
35
35
|
"@npmcli/arborist": "^7.0.0",
|
|
36
|
-
"axios": "^1.
|
|
36
|
+
"axios": "^1.6.0",
|
|
37
37
|
"compare-versions": "^6.0.0-rc.1",
|
|
38
|
-
"cosmiconfig": "^
|
|
38
|
+
"cosmiconfig": "^9.0.0",
|
|
39
39
|
"deepmerge": "^4.3.1",
|
|
40
|
-
"git-filesystem": "^0.0.
|
|
40
|
+
"git-filesystem": "^0.0.4",
|
|
41
41
|
"json5": "^2.2.3",
|
|
42
|
-
"zod": "^3.
|
|
43
|
-
},
|
|
44
|
-
"peerDependencies": {
|
|
45
|
-
"@swc/helpers": "0.5.1"
|
|
42
|
+
"zod": "^3.22.3"
|
|
46
43
|
},
|
|
47
44
|
"main": "./src/index.js"
|
|
48
45
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { LicenseCopOptions, checkLicenses } from "./lib/license-cop";
|
|
2
2
|
export { AllowedPackage, CheckLicensesResult, ForbiddenLicenseResult, LicensedPackage, NoLicenseResult } from "./lib/result";
|
package/src/index.js
CHANGED
|
@@ -6,15 +6,29 @@ function _export(target, all) {
|
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
8
|
_export(exports, {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
CheckLicensesResult: ()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
AllowedPackage: function() {
|
|
10
|
+
return _result.AllowedPackage;
|
|
11
|
+
},
|
|
12
|
+
CheckLicensesResult: function() {
|
|
13
|
+
return _result.CheckLicensesResult;
|
|
14
|
+
},
|
|
15
|
+
ForbiddenLicenseResult: function() {
|
|
16
|
+
return _result.ForbiddenLicenseResult;
|
|
17
|
+
},
|
|
18
|
+
LicenseCopOptions: function() {
|
|
19
|
+
return _licensecop.LicenseCopOptions;
|
|
20
|
+
},
|
|
21
|
+
LicensedPackage: function() {
|
|
22
|
+
return _result.LicensedPackage;
|
|
23
|
+
},
|
|
24
|
+
NoLicenseResult: function() {
|
|
25
|
+
return _result.NoLicenseResult;
|
|
26
|
+
},
|
|
27
|
+
checkLicenses: function() {
|
|
28
|
+
return _licensecop.checkLicenses;
|
|
29
|
+
}
|
|
16
30
|
});
|
|
17
|
-
const
|
|
31
|
+
const _licensecop = require("./lib/license-cop");
|
|
18
32
|
const _result = require("./lib/result");
|
|
19
33
|
|
|
20
34
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../packages/license-cop/src/index.ts"],"sourcesContent":["export {
|
|
1
|
+
{"version":3,"sources":["../../../../packages/license-cop/src/index.ts"],"sourcesContent":["export { LicenseCopOptions, checkLicenses } from \"./lib/license-cop\";\nexport {\n AllowedPackage,\n CheckLicensesResult,\n ForbiddenLicenseResult,\n LicensedPackage,\n NoLicenseResult\n} from \"./lib/result\";\n"],"names":["AllowedPackage","CheckLicensesResult","ForbiddenLicenseResult","LicenseCopOptions","LicensedPackage","NoLicenseResult","checkLicenses"],"mappings":";;;;;;;;IAEEA,cAAc;eAAdA,sBAAc;;IACdC,mBAAmB;eAAnBA,2BAAmB;;IACnBC,sBAAsB;eAAtBA,8BAAsB;;IAJfC,iBAAiB;eAAjBA,6BAAiB;;IAKxBC,eAAe;eAAfA,uBAAe;;IACfC,eAAe;eAAfA,uBAAe;;IANWC,aAAa;eAAbA,yBAAa;;;4BAAQ;wBAO1C"}
|
|
@@ -6,21 +6,25 @@ function _export(target, all) {
|
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
8
|
_export(exports, {
|
|
9
|
-
initCommand: ()
|
|
10
|
-
|
|
9
|
+
initCommand: function() {
|
|
10
|
+
return initCommand;
|
|
11
|
+
},
|
|
12
|
+
initCommandAction: function() {
|
|
13
|
+
return initCommandAction;
|
|
14
|
+
}
|
|
11
15
|
});
|
|
12
16
|
const _promises = require("fs/promises");
|
|
13
17
|
const _path = require("path");
|
|
14
18
|
const _logger = require("../../logger");
|
|
15
|
-
const
|
|
19
|
+
const _createcommand = require("../create-command");
|
|
16
20
|
const defaultConfig = `{
|
|
17
21
|
"$schema": "https://license-cop.js.org/schema.json",
|
|
18
22
|
"licenses": ["MIT", "ISC", "Apache-2.0"],
|
|
19
23
|
"packages": []
|
|
20
24
|
}
|
|
21
25
|
`;
|
|
22
|
-
const initCommand = (0,
|
|
23
|
-
const { directory
|
|
26
|
+
const initCommand = (0, _createcommand.createCommandWithGlobalOptions)().name("init").description("Create a new license-cop configuration file").action(async (options)=>{
|
|
27
|
+
const { directory } = options;
|
|
24
28
|
await initCommandAction(directory);
|
|
25
29
|
});
|
|
26
30
|
const initCommandAction = async (rootDir)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../packages/license-cop/src/lib/cli/commands/init.ts"],"sourcesContent":["import { writeFile } from \"fs/promises\";\nimport { join } from \"path\";\nimport logger from \"../../logger\";\nimport { createCommandWithGlobalOptions } from \"../create-command\";\n\nconst defaultConfig = `{\n \"$schema\": \"https://license-cop.js.org/schema.json\",\n \"licenses\": [\"MIT\", \"ISC\", \"Apache-2.0\"],\n \"packages\": []\n}\n`;\n\nexport const initCommand = createCommandWithGlobalOptions()\n .name(\"init\")\n .description(\"Create a new license-cop configuration file\")\n .action(async options => {\n const { directory } = options;\n\n await initCommandAction(directory);\n });\n\nexport const initCommandAction = async (rootDir: string) => {\n logger.log(\"Setting up a new license-cop config file...\");\n\n const configPath = join(rootDir, \".licenses.json\");\n logger.verbose(`Writing config file to: ${configPath}`);\n await writeFile(configPath, defaultConfig);\n\n logger.log(\"Done!\");\n logger.log(\"Run `npx license-cop` to check your dependencies\");\n};\n"],"names":["initCommand","initCommandAction","defaultConfig","createCommandWithGlobalOptions","name","description","action","options","directory","rootDir","logger","log","configPath","join","verbose","writeFile"],"mappings":";;;;;;;;IAYaA,WAAW
|
|
1
|
+
{"version":3,"sources":["../../../../../../../packages/license-cop/src/lib/cli/commands/init.ts"],"sourcesContent":["import { writeFile } from \"fs/promises\";\nimport { join } from \"path\";\nimport logger from \"../../logger\";\nimport { createCommandWithGlobalOptions } from \"../create-command\";\n\nconst defaultConfig = `{\n \"$schema\": \"https://license-cop.js.org/schema.json\",\n \"licenses\": [\"MIT\", \"ISC\", \"Apache-2.0\"],\n \"packages\": []\n}\n`;\n\nexport const initCommand = createCommandWithGlobalOptions()\n .name(\"init\")\n .description(\"Create a new license-cop configuration file\")\n .action(async options => {\n const { directory } = options;\n\n await initCommandAction(directory);\n });\n\nexport const initCommandAction = async (rootDir: string) => {\n logger.log(\"Setting up a new license-cop config file...\");\n\n const configPath = join(rootDir, \".licenses.json\");\n logger.verbose(`Writing config file to: ${configPath}`);\n await writeFile(configPath, defaultConfig);\n\n logger.log(\"Done!\");\n logger.log(\"Run `npx license-cop` to check your dependencies\");\n};\n"],"names":["initCommand","initCommandAction","defaultConfig","createCommandWithGlobalOptions","name","description","action","options","directory","rootDir","logger","log","configPath","join","verbose","writeFile"],"mappings":";;;;;;;;IAYaA,WAAW;eAAXA;;IASAC,iBAAiB;eAAjBA;;;0BArBa;sBACL;wBACF;+BAC4B;AAE/C,MAAMC,gBAAgB,CAAC;;;;;AAKvB,CAAC;AAEM,MAAMF,cAAcG,IAAAA,6CAA8B,IACtDC,IAAI,CAAC,QACLC,WAAW,CAAC,+CACZC,MAAM,CAAC,OAAMC;IACZ,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,MAAMN,kBAAkBO;AAC1B;AAEK,MAAMP,oBAAoB,OAAOQ;IACtCC,eAAM,CAACC,GAAG,CAAC;IAEX,MAAMC,aAAaC,IAAAA,UAAI,EAACJ,SAAS;IACjCC,eAAM,CAACI,OAAO,CAAC,CAAC,wBAAwB,EAAEF,WAAW,CAAC;IACtD,MAAMG,IAAAA,mBAAS,EAACH,YAAYV;IAE5BQ,eAAM,CAACC,GAAG,CAAC;IACXD,eAAM,CAACC,GAAG,CAAC;AACb"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "mainCommand", {
|
|
3
3
|
enumerable: true,
|
|
4
|
-
get: ()
|
|
4
|
+
get: function() {
|
|
5
|
+
return mainCommand;
|
|
6
|
+
}
|
|
5
7
|
});
|
|
6
8
|
const _path = require("path");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
+
const _loadconfig = require("../../config/load-config");
|
|
10
|
+
const _licensecop = require("../../license-cop");
|
|
9
11
|
const _logger = require("../../logger");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
12
|
+
const _packagejson = require("../../package-json");
|
|
13
|
+
const _createcommand = require("../create-command");
|
|
14
|
+
const _reportfailure = require("../report-failure");
|
|
15
|
+
const _reportsuccess = require("../report-success");
|
|
14
16
|
const _init = require("./init");
|
|
15
|
-
const mainCommand = (0,
|
|
16
|
-
const { directory
|
|
17
|
+
const mainCommand = (0, _createcommand.createCommandWithGlobalOptions)().name("license-cop").description("Yet another license checker tool for your dependencies; focused on simplicity").option("-D,--include-dev", "Include dev dependencies", false).option("--dev-only", "Only check dev dependencies", false).option("--init", "An alias for 'license-cop init'", false).action(async (options)=>{
|
|
18
|
+
const { directory, includeDev, devOnly } = options;
|
|
17
19
|
if (options.init) {
|
|
18
20
|
await (0, _init.initCommandAction)(directory);
|
|
19
21
|
return;
|
|
@@ -24,7 +26,7 @@ const runLicenseCop = async (directory, includeDevDependencies, devDependenciesO
|
|
|
24
26
|
_logger.default.verbose(`Using directory: ${directory}`);
|
|
25
27
|
const productName = await getProductName(directory);
|
|
26
28
|
_logger.default.log(`Scanning dependencies of: ${productName}`);
|
|
27
|
-
const config = await (0,
|
|
29
|
+
const config = await (0, _loadconfig.loadConfig)(directory);
|
|
28
30
|
const options = {
|
|
29
31
|
allowedLicenses: config.licenses,
|
|
30
32
|
allowedPackages: config.packages,
|
|
@@ -32,17 +34,17 @@ const runLicenseCop = async (directory, includeDevDependencies, devDependenciesO
|
|
|
32
34
|
includeDevDependencies: includeDevDependencies != null ? includeDevDependencies : config.includeDevDependencies,
|
|
33
35
|
devDependenciesOnly: devDependenciesOnly != null ? devDependenciesOnly : config.devDependenciesOnly
|
|
34
36
|
};
|
|
35
|
-
const result = await (0,
|
|
37
|
+
const result = await (0, _licensecop.checkLicenses)(options);
|
|
36
38
|
if (result.noLicenses.size > 0 || result.forbiddenLicenses.size > 0) {
|
|
37
|
-
(0,
|
|
39
|
+
(0, _reportfailure.reportFailure)(result);
|
|
38
40
|
process.exitCode = 1;
|
|
39
41
|
} else {
|
|
40
|
-
(0,
|
|
42
|
+
(0, _reportsuccess.reportSuccess)(result);
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
45
|
const getProductName = async (directory)=>{
|
|
44
46
|
const packageJsonPath = (0, _path.join)(directory, "package.json");
|
|
45
|
-
const packageJson = await (0,
|
|
47
|
+
const packageJson = await (0, _packagejson.readPackageJson)(packageJsonPath);
|
|
46
48
|
return packageJson.name;
|
|
47
49
|
};
|
|
48
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../packages/license-cop/src/lib/cli/commands/main.ts"],"sourcesContent":["import { join } from \"path\";\nimport { loadConfig } from \"../../config/load-config\";\nimport { checkLicenses, LicenseCopOptions } from \"../../license-cop\";\nimport logger from \"../../logger\";\nimport { readPackageJson } from \"../../package-json\";\nimport { createCommandWithGlobalOptions } from \"../create-command\";\nimport { reportFailure } from \"../report-failure\";\nimport { reportSuccess } from \"../report-success\";\nimport { initCommandAction } from \"./init\";\n\nexport const mainCommand = createCommandWithGlobalOptions()\n .name(\"license-cop\")\n .description(\"Yet another license checker tool for your dependencies; focused on simplicity\")\n .option(\"-D,--include-dev\", \"Include dev dependencies\", false)\n .option(\"--dev-only\", \"Only check dev dependencies\", false)\n .option(\"--init\", \"An alias for 'license-cop init'\", false)\n .action(async options => {\n const { directory, includeDev, devOnly } = options;\n\n if (options.init) {\n await initCommandAction(directory);\n return;\n }\n\n await runLicenseCop(directory, includeDev, devOnly);\n });\n\nconst runLicenseCop = async (\n directory: string,\n includeDevDependencies: boolean,\n devDependenciesOnly: boolean\n) => {\n logger.verbose(`Using directory: ${directory}`);\n\n const productName = await getProductName(directory);\n logger.log(`Scanning dependencies of: ${productName}`);\n\n const config = await loadConfig(directory);\n\n const options: LicenseCopOptions = {\n allowedLicenses: config.licenses,\n allowedPackages: config.packages,\n\n workingDirectory: directory,\n includeDevDependencies: includeDevDependencies ?? config.includeDevDependencies,\n devDependenciesOnly: devDependenciesOnly ?? config.devDependenciesOnly\n };\n\n const result = await checkLicenses(options);\n\n if (result.noLicenses.size > 0 || result.forbiddenLicenses.size > 0) {\n reportFailure(result);\n process.exitCode = 1;\n } else {\n reportSuccess(result);\n }\n};\n\nconst getProductName = async (directory: string): Promise<string> => {\n const packageJsonPath = join(directory, \"package.json\");\n const packageJson = await readPackageJson(packageJsonPath);\n return packageJson.name;\n};\n"],"names":["mainCommand","createCommandWithGlobalOptions","name","description","option","action","options","directory","includeDev","devOnly","init","initCommandAction","runLicenseCop","includeDevDependencies","devDependenciesOnly","logger","verbose","productName","getProductName","log","config","loadConfig","allowedLicenses","licenses","allowedPackages","packages","workingDirectory","result","checkLicenses","noLicenses","size","forbiddenLicenses","reportFailure","process","exitCode","reportSuccess","packageJsonPath","join","packageJson","readPackageJson"],"mappings":";+BAUaA
|
|
1
|
+
{"version":3,"sources":["../../../../../../../packages/license-cop/src/lib/cli/commands/main.ts"],"sourcesContent":["import { join } from \"path\";\nimport { loadConfig } from \"../../config/load-config\";\nimport { checkLicenses, LicenseCopOptions } from \"../../license-cop\";\nimport logger from \"../../logger\";\nimport { readPackageJson } from \"../../package-json\";\nimport { createCommandWithGlobalOptions } from \"../create-command\";\nimport { reportFailure } from \"../report-failure\";\nimport { reportSuccess } from \"../report-success\";\nimport { initCommandAction } from \"./init\";\n\nexport const mainCommand = createCommandWithGlobalOptions()\n .name(\"license-cop\")\n .description(\"Yet another license checker tool for your dependencies; focused on simplicity\")\n .option(\"-D,--include-dev\", \"Include dev dependencies\", false)\n .option(\"--dev-only\", \"Only check dev dependencies\", false)\n .option(\"--init\", \"An alias for 'license-cop init'\", false)\n .action(async options => {\n const { directory, includeDev, devOnly } = options;\n\n if (options.init) {\n await initCommandAction(directory);\n return;\n }\n\n await runLicenseCop(directory, includeDev, devOnly);\n });\n\nconst runLicenseCop = async (\n directory: string,\n includeDevDependencies: boolean,\n devDependenciesOnly: boolean\n) => {\n logger.verbose(`Using directory: ${directory}`);\n\n const productName = await getProductName(directory);\n logger.log(`Scanning dependencies of: ${productName}`);\n\n const config = await loadConfig(directory);\n\n const options: LicenseCopOptions = {\n allowedLicenses: config.licenses,\n allowedPackages: config.packages,\n\n workingDirectory: directory,\n includeDevDependencies: includeDevDependencies ?? config.includeDevDependencies,\n devDependenciesOnly: devDependenciesOnly ?? config.devDependenciesOnly\n };\n\n const result = await checkLicenses(options);\n\n if (result.noLicenses.size > 0 || result.forbiddenLicenses.size > 0) {\n reportFailure(result);\n process.exitCode = 1;\n } else {\n reportSuccess(result);\n }\n};\n\nconst getProductName = async (directory: string): Promise<string> => {\n const packageJsonPath = join(directory, \"package.json\");\n const packageJson = await readPackageJson(packageJsonPath);\n return packageJson.name;\n};\n"],"names":["mainCommand","createCommandWithGlobalOptions","name","description","option","action","options","directory","includeDev","devOnly","init","initCommandAction","runLicenseCop","includeDevDependencies","devDependenciesOnly","logger","verbose","productName","getProductName","log","config","loadConfig","allowedLicenses","licenses","allowedPackages","packages","workingDirectory","result","checkLicenses","noLicenses","size","forbiddenLicenses","reportFailure","process","exitCode","reportSuccess","packageJsonPath","join","packageJson","readPackageJson"],"mappings":";+BAUaA;;;eAAAA;;;sBAVQ;4BACM;4BACsB;wBAC9B;6BACa;+BACe;+BACjB;+BACA;sBACI;AAE3B,MAAMA,cAAcC,IAAAA,6CAA8B,IACtDC,IAAI,CAAC,eACLC,WAAW,CAAC,iFACZC,MAAM,CAAC,oBAAoB,4BAA4B,OACvDA,MAAM,CAAC,cAAc,+BAA+B,OACpDA,MAAM,CAAC,UAAU,mCAAmC,OACpDC,MAAM,CAAC,OAAMC;IACZ,MAAM,EAAEC,SAAS,EAAEC,UAAU,EAAEC,OAAO,EAAE,GAAGH;IAE3C,IAAIA,QAAQI,IAAI,EAAE;QAChB,MAAMC,IAAAA,uBAAiB,EAACJ;QACxB;IACF;IAEA,MAAMK,cAAcL,WAAWC,YAAYC;AAC7C;AAEF,MAAMG,gBAAgB,OACpBL,WACAM,wBACAC;IAEAC,eAAM,CAACC,OAAO,CAAC,CAAC,iBAAiB,EAAET,UAAU,CAAC;IAE9C,MAAMU,cAAc,MAAMC,eAAeX;IACzCQ,eAAM,CAACI,GAAG,CAAC,CAAC,0BAA0B,EAAEF,YAAY,CAAC;IAErD,MAAMG,SAAS,MAAMC,IAAAA,sBAAU,EAACd;IAEhC,MAAMD,UAA6B;QACjCgB,iBAAiBF,OAAOG,QAAQ;QAChCC,iBAAiBJ,OAAOK,QAAQ;QAEhCC,kBAAkBnB;QAClBM,wBAAwBA,iCAAAA,yBAA0BO,OAAOP,sBAAsB;QAC/EC,qBAAqBA,8BAAAA,sBAAuBM,OAAON,mBAAmB;IACxE;IAEA,MAAMa,SAAS,MAAMC,IAAAA,yBAAa,EAACtB;IAEnC,IAAIqB,OAAOE,UAAU,CAACC,IAAI,GAAG,KAAKH,OAAOI,iBAAiB,CAACD,IAAI,GAAG,GAAG;QACnEE,IAAAA,4BAAa,EAACL;QACdM,QAAQC,QAAQ,GAAG;IACrB,OAAO;QACLC,IAAAA,4BAAa,EAACR;IAChB;AACF;AAEA,MAAMT,iBAAiB,OAAOX;IAC5B,MAAM6B,kBAAkBC,IAAAA,UAAI,EAAC9B,WAAW;IACxC,MAAM+B,cAAc,MAAMC,IAAAA,4BAAe,EAACH;IAC1C,OAAOE,YAAYpC,IAAI;AACzB"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "versionCommand", {
|
|
3
3
|
enumerable: true,
|
|
4
|
-
get: ()
|
|
4
|
+
get: function() {
|
|
5
|
+
return versionCommand;
|
|
6
|
+
}
|
|
5
7
|
});
|
|
6
8
|
const _path = require("path");
|
|
7
9
|
const _logger = require("../../logger");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const versionCommand = (0,
|
|
10
|
+
const _packagejson = require("../../package-json");
|
|
11
|
+
const _createcommand = require("../create-command");
|
|
12
|
+
const versionCommand = (0, _createcommand.createCommandWithGlobalOptions)().name("-v").alias("--version").description("Print the installed version of license-cop").action(async ()=>{
|
|
11
13
|
await printPackageVersion();
|
|
12
14
|
});
|
|
13
15
|
const printPackageVersion = async ()=>{
|
|
14
16
|
const packageJsonLocation = (0, _path.join)(__dirname, "../../../../package.json");
|
|
15
|
-
const { version
|
|
17
|
+
const { version } = await (0, _packagejson.readPackageJson)(packageJsonLocation);
|
|
16
18
|
_logger.default.log(`v${version}`);
|
|
17
19
|
};
|
|
18
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../packages/license-cop/src/lib/cli/commands/version.ts"],"sourcesContent":["import { join } from \"path\";\nimport logger from \"../../logger\";\nimport { readPackageJson } from \"../../package-json\";\nimport { createCommandWithGlobalOptions } from \"../create-command\";\n\nexport const versionCommand = createCommandWithGlobalOptions()\n .name(\"-v\")\n .alias(\"--version\")\n .description(\"Print the installed version of license-cop\")\n .action(async () => {\n await printPackageVersion();\n });\n\nconst printPackageVersion = async (): Promise<void> => {\n const packageJsonLocation = join(__dirname, \"../../../../package.json\");\n const { version } = await readPackageJson(packageJsonLocation);\n logger.log(`v${version}`);\n};\n"],"names":["versionCommand","createCommandWithGlobalOptions","name","alias","description","action","printPackageVersion","packageJsonLocation","join","__dirname","version","readPackageJson","logger","log"],"mappings":";+BAKaA
|
|
1
|
+
{"version":3,"sources":["../../../../../../../packages/license-cop/src/lib/cli/commands/version.ts"],"sourcesContent":["import { join } from \"path\";\nimport logger from \"../../logger\";\nimport { readPackageJson } from \"../../package-json\";\nimport { createCommandWithGlobalOptions } from \"../create-command\";\n\nexport const versionCommand = createCommandWithGlobalOptions()\n .name(\"-v\")\n .alias(\"--version\")\n .description(\"Print the installed version of license-cop\")\n .action(async () => {\n await printPackageVersion();\n });\n\nconst printPackageVersion = async (): Promise<void> => {\n const packageJsonLocation = join(__dirname, \"../../../../package.json\");\n const { version } = await readPackageJson(packageJsonLocation);\n logger.log(`v${version}`);\n};\n"],"names":["versionCommand","createCommandWithGlobalOptions","name","alias","description","action","printPackageVersion","packageJsonLocation","join","__dirname","version","readPackageJson","logger","log"],"mappings":";+BAKaA;;;eAAAA;;;sBALQ;wBACF;6BACa;+BACe;AAExC,MAAMA,iBAAiBC,IAAAA,6CAA8B,IACzDC,IAAI,CAAC,MACLC,KAAK,CAAC,aACNC,WAAW,CAAC,8CACZC,MAAM,CAAC;IACN,MAAMC;AACR;AAEF,MAAMA,sBAAsB;IAC1B,MAAMC,sBAAsBC,IAAAA,UAAI,EAACC,WAAW;IAC5C,MAAM,EAAEC,OAAO,EAAE,GAAG,MAAMC,IAAAA,4BAAe,EAACJ;IAC1CK,eAAM,CAACC,GAAG,CAAC,CAAC,CAAC,EAAEH,QAAQ,CAAC;AAC1B"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "createCommandWithGlobalOptions", {
|
|
3
3
|
enumerable: true,
|
|
4
|
-
get: ()
|
|
4
|
+
get: function() {
|
|
5
|
+
return createCommandWithGlobalOptions;
|
|
6
|
+
}
|
|
5
7
|
});
|
|
6
|
-
const
|
|
8
|
+
const _extratypings = require("@commander-js/extra-typings");
|
|
7
9
|
const _logger = require("../logger");
|
|
8
|
-
const createCommandWithGlobalOptions = ()=>new
|
|
9
|
-
const { verbose
|
|
10
|
+
const createCommandWithGlobalOptions = ()=>new _extratypings.Command().option("--verbose", "Enable verbose logging").option("-d,--directory <directory>", "The directory of the project. Defaults to the current working directory.", process.cwd()).hook("preAction", (thisCommand)=>{
|
|
11
|
+
const { verbose } = thisCommand.opts();
|
|
10
12
|
if (verbose) {
|
|
11
13
|
_logger.default.enableVerboseLogging();
|
|
12
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/cli/create-command.ts"],"sourcesContent":["import { Command } from \"@commander-js/extra-typings\";\nimport logger from \"../logger\";\n\nexport const createCommandWithGlobalOptions = () =>\n new Command()\n .option(\"--verbose\", \"Enable verbose logging\")\n .option(\n \"-d,--directory <directory>\",\n \"The directory of the project. Defaults to the current working directory.\",\n process.cwd()\n )\n .hook(\"preAction\", thisCommand => {\n const { verbose } = thisCommand.opts();\n\n if (verbose) {\n logger.enableVerboseLogging();\n }\n });\n"],"names":["createCommandWithGlobalOptions","Command","option","process","cwd","hook","thisCommand","verbose","opts","logger","enableVerboseLogging"],"mappings":";+BAGaA
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/cli/create-command.ts"],"sourcesContent":["import { Command } from \"@commander-js/extra-typings\";\nimport logger from \"../logger\";\n\nexport const createCommandWithGlobalOptions = () =>\n new Command()\n .option(\"--verbose\", \"Enable verbose logging\")\n .option(\n \"-d,--directory <directory>\",\n \"The directory of the project. Defaults to the current working directory.\",\n process.cwd()\n )\n .hook(\"preAction\", thisCommand => {\n const { verbose } = thisCommand.opts();\n\n if (verbose) {\n logger.enableVerboseLogging();\n }\n });\n"],"names":["createCommandWithGlobalOptions","Command","option","process","cwd","hook","thisCommand","verbose","opts","logger","enableVerboseLogging"],"mappings":";+BAGaA;;;eAAAA;;;8BAHW;wBACL;AAEZ,MAAMA,iCAAiC,IAC5C,IAAIC,qBAAO,GACRC,MAAM,CAAC,aAAa,0BACpBA,MAAM,CACL,8BACA,4EACAC,QAAQC,GAAG,IAEZC,IAAI,CAAC,aAAaC,CAAAA;QACjB,MAAM,EAAEC,OAAO,EAAE,GAAGD,YAAYE,IAAI;QAEpC,IAAID,SAAS;YACXE,eAAM,CAACC,oBAAoB;QAC7B;IACF"}
|
package/src/lib/cli/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "main", {
|
|
3
3
|
enumerable: true,
|
|
4
|
-
get: ()
|
|
4
|
+
get: function() {
|
|
5
|
+
return main;
|
|
6
|
+
}
|
|
5
7
|
});
|
|
6
8
|
const _logger = require("../logger");
|
|
7
9
|
const _init = require("./commands/init");
|
|
8
|
-
const _version = require("./commands/version");
|
|
9
10
|
const _main = require("./commands/main");
|
|
11
|
+
const _version = require("./commands/version");
|
|
10
12
|
const main = async (args)=>{
|
|
11
13
|
_logger.default.enableLogging();
|
|
12
14
|
await program.parseAsync(args);
|
package/src/lib/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/cli/index.ts"],"sourcesContent":["import logger from \"../logger\";\nimport { initCommand } from \"./commands/init\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/cli/index.ts"],"sourcesContent":["import logger from \"../logger\";\nimport { initCommand } from \"./commands/init\";\nimport { mainCommand } from \"./commands/main\";\nimport { versionCommand } from \"./commands/version\";\n\nexport const main = async (args: string[]): Promise<void> => {\n logger.enableLogging();\n await program.parseAsync(args);\n};\n\nconst program = mainCommand.addCommand(initCommand).addCommand(versionCommand);\n"],"names":["main","args","logger","enableLogging","program","parseAsync","mainCommand","addCommand","initCommand","versionCommand"],"mappings":";+BAKaA;;;eAAAA;;;wBALM;sBACS;sBACA;yBACG;AAExB,MAAMA,OAAO,OAAOC;IACzBC,eAAM,CAACC,aAAa;IACpB,MAAMC,QAAQC,UAAU,CAACJ;AAC3B;AAEA,MAAMG,UAAUE,iBAAW,CAACC,UAAU,CAACC,iBAAW,EAAED,UAAU,CAACE,uBAAc"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "reportFailure", {
|
|
3
3
|
enumerable: true,
|
|
4
|
-
get: ()
|
|
4
|
+
get: function() {
|
|
5
|
+
return reportFailure;
|
|
6
|
+
}
|
|
5
7
|
});
|
|
6
8
|
const _logger = require("../logger");
|
|
7
9
|
const reportFailure = (result)=>{
|
|
8
|
-
const { noLicenses
|
|
10
|
+
const { noLicenses, forbiddenLicenses } = result;
|
|
9
11
|
_logger.default.log("Found the following issues...\n");
|
|
10
12
|
if (noLicenses.size > 0) {
|
|
11
13
|
logNoLicenseIssues(noLicenses);
|
|
@@ -17,7 +19,7 @@ const reportFailure = (result)=>{
|
|
|
17
19
|
const logNoLicenseIssues = (noLicenseResults)=>{
|
|
18
20
|
_logger.default.error("Packages with no license:");
|
|
19
21
|
for (const result of noLicenseResults.values()){
|
|
20
|
-
const { name
|
|
22
|
+
const { name, version } = result;
|
|
21
23
|
_logger.default.error(`${name}@${version}`);
|
|
22
24
|
}
|
|
23
25
|
_logger.default.error("");
|
|
@@ -25,7 +27,7 @@ const logNoLicenseIssues = (noLicenseResults)=>{
|
|
|
25
27
|
const logForbiddenLicenseIssues = (forbiddenLicensesResults)=>{
|
|
26
28
|
_logger.default.error("Packages with forbidden licenses:");
|
|
27
29
|
for (const result of forbiddenLicensesResults.values()){
|
|
28
|
-
const { name
|
|
30
|
+
const { name, version, licenseIdentifiers, spdxExpression } = result;
|
|
29
31
|
const licenseDetails = licenseIdentifiers === spdxExpression ? licenseIdentifiers : `${licenseIdentifiers} from ${spdxExpression}`;
|
|
30
32
|
_logger.default.error(`${name}@${version} - ${licenseDetails}`);
|
|
31
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/cli/report-failure.ts"],"sourcesContent":["import logger from \"../logger\";\nimport { CheckLicensesResult, ForbiddenLicenseResult, NoLicenseResult } from \"../result\";\n\nexport const reportFailure = (result: CheckLicensesResult): void => {\n const { noLicenses, forbiddenLicenses } = result;\n\n logger.log(\"Found the following issues...\\n\");\n\n if (noLicenses.size > 0) {\n logNoLicenseIssues(noLicenses);\n }\n\n if (forbiddenLicenses.size > 0) {\n logForbiddenLicenseIssues(forbiddenLicenses);\n }\n};\n\nconst logNoLicenseIssues = (noLicenseResults: Set<NoLicenseResult>) => {\n logger.error(\"Packages with no license:\");\n\n for (const result of noLicenseResults.values()) {\n const { name, version } = result;\n logger.error(`${name}@${version}`);\n }\n\n logger.error(\"\");\n};\n\nconst logForbiddenLicenseIssues = (forbiddenLicensesResults: Set<ForbiddenLicenseResult>): void => {\n logger.error(\"Packages with forbidden licenses:\");\n\n for (const result of forbiddenLicensesResults.values()) {\n const { name, version, licenseIdentifiers, spdxExpression } = result;\n\n const licenseDetails =\n licenseIdentifiers === spdxExpression\n ? licenseIdentifiers\n : `${licenseIdentifiers} from ${spdxExpression}`;\n\n logger.error(`${name}@${version} - ${licenseDetails}`);\n }\n};\n"],"names":["reportFailure","result","noLicenses","forbiddenLicenses","logger","log","size","logNoLicenseIssues","logForbiddenLicenseIssues","noLicenseResults","error","values","name","version","forbiddenLicensesResults","licenseIdentifiers","spdxExpression","licenseDetails"],"mappings":";+BAGaA
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/cli/report-failure.ts"],"sourcesContent":["import logger from \"../logger\";\nimport { CheckLicensesResult, ForbiddenLicenseResult, NoLicenseResult } from \"../result\";\n\nexport const reportFailure = (result: CheckLicensesResult): void => {\n const { noLicenses, forbiddenLicenses } = result;\n\n logger.log(\"Found the following issues...\\n\");\n\n if (noLicenses.size > 0) {\n logNoLicenseIssues(noLicenses);\n }\n\n if (forbiddenLicenses.size > 0) {\n logForbiddenLicenseIssues(forbiddenLicenses);\n }\n};\n\nconst logNoLicenseIssues = (noLicenseResults: Set<NoLicenseResult>) => {\n logger.error(\"Packages with no license:\");\n\n for (const result of noLicenseResults.values()) {\n const { name, version } = result;\n logger.error(`${name}@${version}`);\n }\n\n logger.error(\"\");\n};\n\nconst logForbiddenLicenseIssues = (forbiddenLicensesResults: Set<ForbiddenLicenseResult>): void => {\n logger.error(\"Packages with forbidden licenses:\");\n\n for (const result of forbiddenLicensesResults.values()) {\n const { name, version, licenseIdentifiers, spdxExpression } = result;\n\n const licenseDetails =\n licenseIdentifiers === spdxExpression\n ? licenseIdentifiers\n : `${licenseIdentifiers} from ${spdxExpression}`;\n\n logger.error(`${name}@${version} - ${licenseDetails}`);\n }\n};\n"],"names":["reportFailure","result","noLicenses","forbiddenLicenses","logger","log","size","logNoLicenseIssues","logForbiddenLicenseIssues","noLicenseResults","error","values","name","version","forbiddenLicensesResults","licenseIdentifiers","spdxExpression","licenseDetails"],"mappings":";+BAGaA;;;eAAAA;;;wBAHM;AAGZ,MAAMA,gBAAgB,CAACC;IAC5B,MAAM,EAAEC,UAAU,EAAEC,iBAAiB,EAAE,GAAGF;IAE1CG,eAAM,CAACC,GAAG,CAAC;IAEX,IAAIH,WAAWI,IAAI,GAAG,GAAG;QACvBC,mBAAmBL;IACrB;IAEA,IAAIC,kBAAkBG,IAAI,GAAG,GAAG;QAC9BE,0BAA0BL;IAC5B;AACF;AAEA,MAAMI,qBAAqB,CAACE;IAC1BL,eAAM,CAACM,KAAK,CAAC;IAEb,KAAK,MAAMT,UAAUQ,iBAAiBE,MAAM,GAAI;QAC9C,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAE,GAAGZ;QAC1BG,eAAM,CAACM,KAAK,CAAC,CAAC,EAAEE,KAAK,CAAC,EAAEC,QAAQ,CAAC;IACnC;IAEAT,eAAM,CAACM,KAAK,CAAC;AACf;AAEA,MAAMF,4BAA4B,CAACM;IACjCV,eAAM,CAACM,KAAK,CAAC;IAEb,KAAK,MAAMT,UAAUa,yBAAyBH,MAAM,GAAI;QACtD,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEE,kBAAkB,EAAEC,cAAc,EAAE,GAAGf;QAE9D,MAAMgB,iBACJF,uBAAuBC,iBACnBD,qBACA,CAAC,EAAEA,mBAAmB,MAAM,EAAEC,eAAe,CAAC;QAEpDZ,eAAM,CAACM,KAAK,CAAC,CAAC,EAAEE,KAAK,CAAC,EAAEC,QAAQ,GAAG,EAAEI,eAAe,CAAC;IACvD;AACF"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "reportSuccess", {
|
|
3
3
|
enumerable: true,
|
|
4
|
-
get: ()
|
|
4
|
+
get: function() {
|
|
5
|
+
return reportSuccess;
|
|
6
|
+
}
|
|
5
7
|
});
|
|
6
8
|
const _logger = require("../logger");
|
|
7
9
|
const reportSuccess = (result)=>{
|
|
8
|
-
const { allowedPackages
|
|
10
|
+
const { allowedPackages, allowedLicenses } = result;
|
|
9
11
|
_logger.default.log("\nDone! No issues found");
|
|
10
12
|
if (allowedPackages.size !== 0) {
|
|
11
13
|
_logger.default.log(`Found ${allowedPackages.size} allowed packages`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/cli/report-success.ts"],"sourcesContent":["import logger from \"../logger\";\nimport { CheckLicensesResult } from \"../result\";\n\nexport const reportSuccess = (result: CheckLicensesResult): void => {\n const { allowedPackages, allowedLicenses } = result;\n\n logger.log(\"\\nDone! No issues found\");\n\n if (allowedPackages.size !== 0) {\n logger.log(`Found ${allowedPackages.size} allowed packages`);\n }\n\n if (allowedLicenses.size !== 0) {\n logger.log(`Found ${allowedLicenses.size} packages with allowed licenses`);\n }\n\n logger.verbose(\"\\nExiting with error code 0\");\n process.exitCode = 0;\n};\n"],"names":["reportSuccess","result","allowedPackages","allowedLicenses","logger","log","size","verbose","process","exitCode"],"mappings":";+BAGaA
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/cli/report-success.ts"],"sourcesContent":["import logger from \"../logger\";\nimport { CheckLicensesResult } from \"../result\";\n\nexport const reportSuccess = (result: CheckLicensesResult): void => {\n const { allowedPackages, allowedLicenses } = result;\n\n logger.log(\"\\nDone! No issues found\");\n\n if (allowedPackages.size !== 0) {\n logger.log(`Found ${allowedPackages.size} allowed packages`);\n }\n\n if (allowedLicenses.size !== 0) {\n logger.log(`Found ${allowedLicenses.size} packages with allowed licenses`);\n }\n\n logger.verbose(\"\\nExiting with error code 0\");\n process.exitCode = 0;\n};\n"],"names":["reportSuccess","result","allowedPackages","allowedLicenses","logger","log","size","verbose","process","exitCode"],"mappings":";+BAGaA;;;eAAAA;;;wBAHM;AAGZ,MAAMA,gBAAgB,CAACC;IAC5B,MAAM,EAAEC,eAAe,EAAEC,eAAe,EAAE,GAAGF;IAE7CG,eAAM,CAACC,GAAG,CAAC;IAEX,IAAIH,gBAAgBI,IAAI,KAAK,GAAG;QAC9BF,eAAM,CAACC,GAAG,CAAC,CAAC,MAAM,EAAEH,gBAAgBI,IAAI,CAAC,iBAAiB,CAAC;IAC7D;IAEA,IAAIH,gBAAgBG,IAAI,KAAK,GAAG;QAC9BF,eAAM,CAACC,GAAG,CAAC,CAAC,MAAM,EAAEF,gBAAgBG,IAAI,CAAC,+BAA+B,CAAC;IAC3E;IAEAF,eAAM,CAACG,OAAO,CAAC;IACfC,QAAQC,QAAQ,GAAG;AACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/config/config-error.ts"],"sourcesContent":["export class ConfigError extends Error {\n constructor(message: string) {\n super(`Config error: ${message}`);\n }\n\n static fromUnknown(e: unknown): ConfigError {\n const message = resolveMessage(e);\n return new ConfigError(message);\n }\n}\n\nconst resolveMessage = (e: unknown): string => {\n if (e instanceof Error) {\n return e.message;\n }\n\n if (typeof e === \"string\") {\n return e;\n }\n\n return \"Unknown error\";\n};\n"],"names":["ConfigError","Error","fromUnknown","e","message","resolveMessage","constructor"],"mappings":";+BAAaA
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/config/config-error.ts"],"sourcesContent":["export class ConfigError extends Error {\n constructor(message: string) {\n super(`Config error: ${message}`);\n }\n\n static fromUnknown(e: unknown): ConfigError {\n const message = resolveMessage(e);\n return new ConfigError(message);\n }\n}\n\nconst resolveMessage = (e: unknown): string => {\n if (e instanceof Error) {\n return e.message;\n }\n\n if (typeof e === \"string\") {\n return e;\n }\n\n return \"Unknown error\";\n};\n"],"names":["ConfigError","Error","fromUnknown","e","message","resolveMessage","constructor"],"mappings":";+BAAaA;;;eAAAA;;;AAAN,IAAA,AAAMA,cAAN,MAAMA,oBAAoBC;IAK/B,OAAOC,YAAYC,CAAU,EAAe;QAC1C,MAAMC,UAAUC,eAAeF;QAC/B,OAAO,IAAIH,YAAYI;IACzB;IAPAE,YAAYF,OAAe,CAAE;QAC3B,KAAK,CAAC,CAAC,cAAc,EAAEA,QAAQ,CAAC;IAClC;AAMF;AAEA,MAAMC,iBAAiB,CAACF;IACtB,IAAIA,aAAaF,OAAO;QACtB,OAAOE,EAAEC,OAAO;IAClB;IAEA,IAAI,OAAOD,MAAM,UAAU;QACzB,OAAOA;IACT;IAEA,OAAO;AACT"}
|
package/src/lib/config/config.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "parseConfig", {
|
|
3
3
|
enumerable: true,
|
|
4
|
-
get: ()
|
|
4
|
+
get: function() {
|
|
5
|
+
return parseConfig;
|
|
6
|
+
}
|
|
5
7
|
});
|
|
6
8
|
const _zod = require("zod");
|
|
7
|
-
const
|
|
8
|
-
var _c_licenses, _c_packages, _c_includeDevDependencies, _c_devDependenciesOnly;
|
|
9
|
+
const _configerror = require("./config-error");
|
|
9
10
|
const configParser = _zod.z.object({
|
|
10
11
|
extends: _zod.z.string().optional(),
|
|
11
12
|
licenses: _zod.z.array(_zod.z.string()).optional(),
|
|
@@ -13,17 +14,20 @@ const configParser = _zod.z.object({
|
|
|
13
14
|
includeDevDependencies: _zod.z.boolean().optional(),
|
|
14
15
|
devDependenciesOnly: _zod.z.boolean().optional(),
|
|
15
16
|
directory: _zod.z.string().optional()
|
|
16
|
-
}).transform((c)=>
|
|
17
|
+
}).transform((c)=>{
|
|
18
|
+
var _c_licenses, _c_packages, _c_includeDevDependencies, _c_devDependenciesOnly;
|
|
19
|
+
return {
|
|
17
20
|
extends: c.extends,
|
|
18
21
|
licenses: (_c_licenses = c.licenses) != null ? _c_licenses : [],
|
|
19
22
|
packages: (_c_packages = c.packages) != null ? _c_packages : [],
|
|
20
23
|
includeDevDependencies: (_c_includeDevDependencies = c.includeDevDependencies) != null ? _c_includeDevDependencies : false,
|
|
21
24
|
devDependenciesOnly: (_c_devDependenciesOnly = c.devDependenciesOnly) != null ? _c_devDependenciesOnly : false
|
|
22
|
-
}
|
|
25
|
+
};
|
|
26
|
+
});
|
|
23
27
|
const parseConfig = (config)=>{
|
|
24
28
|
const parseResult = configParser.safeParse(config);
|
|
25
29
|
if (!parseResult.success) {
|
|
26
|
-
throw new
|
|
30
|
+
throw new _configerror.ConfigError(parseResult.error.message);
|
|
27
31
|
}
|
|
28
32
|
return parseResult.data;
|
|
29
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/config/config.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { ConfigError } from \"./config-error\";\n\nconst configParser = z\n .object({\n extends: z.string().optional(),\n licenses: z.array(z.string()).optional(),\n packages: z.array(z.string()).optional(),\n includeDevDependencies: z.boolean().optional(),\n devDependenciesOnly: z.boolean().optional(),\n directory: z.string().optional()\n })\n .transform(c => ({\n extends: c.extends,\n licenses: c.licenses ?? [],\n packages: c.packages ?? [],\n includeDevDependencies: c.includeDevDependencies ?? false,\n devDependenciesOnly: c.devDependenciesOnly ?? false\n }));\n\nexport type Config = z.infer<typeof configParser>;\n\nexport const parseConfig = (config: unknown): Config => {\n const parseResult = configParser.safeParse(config);\n\n if (!parseResult.success) {\n throw new ConfigError(parseResult.error.message);\n }\n\n return parseResult.data;\n};\n"],"names":["parseConfig","
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/config/config.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { ConfigError } from \"./config-error\";\n\nconst configParser = z\n .object({\n extends: z.string().optional(),\n licenses: z.array(z.string()).optional(),\n packages: z.array(z.string()).optional(),\n includeDevDependencies: z.boolean().optional(),\n devDependenciesOnly: z.boolean().optional(),\n directory: z.string().optional()\n })\n .transform(c => ({\n extends: c.extends,\n licenses: c.licenses ?? [],\n packages: c.packages ?? [],\n includeDevDependencies: c.includeDevDependencies ?? false,\n devDependenciesOnly: c.devDependenciesOnly ?? false\n }));\n\nexport type Config = z.infer<typeof configParser>;\n\nexport const parseConfig = (config: unknown): Config => {\n const parseResult = configParser.safeParse(config);\n\n if (!parseResult.success) {\n throw new ConfigError(parseResult.error.message);\n }\n\n return parseResult.data;\n};\n"],"names":["parseConfig","configParser","z","object","extends","string","optional","licenses","array","packages","includeDevDependencies","boolean","devDependenciesOnly","directory","transform","c","config","parseResult","safeParse","success","ConfigError","error","message","data"],"mappings":";+BAsBaA;;;eAAAA;;;qBAtBK;6BACU;AAE5B,MAAMC,eAAeC,MAAC,CACnBC,MAAM,CAAC;IACNC,SAASF,MAAC,CAACG,MAAM,GAAGC,QAAQ;IAC5BC,UAAUL,MAAC,CAACM,KAAK,CAACN,MAAC,CAACG,MAAM,IAAIC,QAAQ;IACtCG,UAAUP,MAAC,CAACM,KAAK,CAACN,MAAC,CAACG,MAAM,IAAIC,QAAQ;IACtCI,wBAAwBR,MAAC,CAACS,OAAO,GAAGL,QAAQ;IAC5CM,qBAAqBV,MAAC,CAACS,OAAO,GAAGL,QAAQ;IACzCO,WAAWX,MAAC,CAACG,MAAM,GAAGC,QAAQ;AAChC,GACCQ,SAAS,CAACC,CAAAA;QAECA,aACAA,aACcA,2BACHA;WALN;QACfX,SAASW,EAAEX,OAAO;QAClBG,UAAUQ,CAAAA,cAAAA,EAAER,QAAQ,YAAVQ,cAAc,EAAE;QAC1BN,UAAUM,CAAAA,cAAAA,EAAEN,QAAQ,YAAVM,cAAc,EAAE;QAC1BL,wBAAwBK,CAAAA,4BAAAA,EAAEL,sBAAsB,YAAxBK,4BAA4B;QACpDH,qBAAqBG,CAAAA,yBAAAA,EAAEH,mBAAmB,YAArBG,yBAAyB;IAChD;AAAA;AAIK,MAAMf,cAAc,CAACgB;IAC1B,MAAMC,cAAchB,aAAaiB,SAAS,CAACF;IAE3C,IAAI,CAACC,YAAYE,OAAO,EAAE;QACxB,MAAM,IAAIC,wBAAW,CAACH,YAAYI,KAAK,CAACC,OAAO;IACjD;IAEA,OAAOL,YAAYM,IAAI;AACzB"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "findConfig", {
|
|
3
3
|
enumerable: true,
|
|
4
|
-
get: ()
|
|
4
|
+
get: function() {
|
|
5
|
+
return findConfig;
|
|
6
|
+
}
|
|
5
7
|
});
|
|
6
8
|
const _cosmiconfig = require("cosmiconfig");
|
|
7
|
-
const
|
|
9
|
+
const _configerror = require("./config-error");
|
|
8
10
|
const _json5 = require("./parsers/json5");
|
|
9
11
|
// cspell:disable-next-line
|
|
10
12
|
const moduleNames = [
|
|
@@ -58,7 +60,7 @@ const findConfig = async (rootDir)=>{
|
|
|
58
60
|
}
|
|
59
61
|
return result.config;
|
|
60
62
|
} catch (e) {
|
|
61
|
-
throw
|
|
63
|
+
throw _configerror.ConfigError.fromUnknown(e);
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
66
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/config/find-config.ts"],"sourcesContent":["import { cosmiconfig, Options as CosmiconfigOptions, Loader } from \"cosmiconfig\";\nimport { ConfigError } from \"./config-error\";\nimport { json5Parse } from \"./parsers/json5\";\n\n// cspell:disable-next-line\nconst moduleNames = [\"licenses\", \"licences\", \"licensesrc\", \"licencesrc\"];\n\nconst generateSearchPlaces = (moduleName: string): string[] => [\n `.${moduleName}`,\n `.${moduleName}.json`,\n `.${moduleName}.jsonc`,\n `.${moduleName}.json5`,\n `.${moduleName}.yaml`,\n `.${moduleName}.yml`,\n `.${moduleName}.js`,\n `.${moduleName}.cjs`,\n `.config/${moduleName}`,\n `.config/${moduleName}.json`,\n `.config/${moduleName}.jsonc`,\n `.config/${moduleName}.json5`,\n `.config/${moduleName}.yaml`,\n `.config/${moduleName}.yml`,\n `.config/${moduleName}.js`,\n `.config/${moduleName}.cjs`,\n `${moduleName}.config.js`,\n `${moduleName}.config.cjs`\n];\n\nconst searchPlaces: string[] = [\"package.json\"];\n\nfor (const moduleName of moduleNames) {\n searchPlaces.push(...generateSearchPlaces(moduleName));\n}\n\nconst json5Loader: Loader = (_filepath, content) => Promise.resolve(json5Parse(content));\n\nexport const findConfig = async (rootDir: string): Promise<unknown> => {\n const options: CosmiconfigOptions = {\n stopDir: rootDir,\n searchPlaces,\n loaders: {\n \".json\": json5Loader,\n \".jsonc\": json5Loader,\n \".json5\": json5Loader\n }\n };\n\n const explorer = cosmiconfig(\"licensecop\", options);\n\n try {\n const result = await explorer.search(rootDir);\n\n if (!result?.config) {\n throw new Error(\"No config file found\");\n }\n\n return result.config;\n } catch (e) {\n throw ConfigError.fromUnknown(e);\n }\n};\n"],"names":["findConfig","moduleNames","generateSearchPlaces","moduleName","searchPlaces","push","json5Loader","_filepath","content","Promise","resolve","json5Parse","rootDir","options","stopDir","loaders","explorer","cosmiconfig","result","search","config","Error","e","ConfigError","fromUnknown"],"mappings":";+BAoCaA
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/config/find-config.ts"],"sourcesContent":["import { cosmiconfig, Options as CosmiconfigOptions, Loader } from \"cosmiconfig\";\nimport { ConfigError } from \"./config-error\";\nimport { json5Parse } from \"./parsers/json5\";\n\n// cspell:disable-next-line\nconst moduleNames = [\"licenses\", \"licences\", \"licensesrc\", \"licencesrc\"];\n\nconst generateSearchPlaces = (moduleName: string): string[] => [\n `.${moduleName}`,\n `.${moduleName}.json`,\n `.${moduleName}.jsonc`,\n `.${moduleName}.json5`,\n `.${moduleName}.yaml`,\n `.${moduleName}.yml`,\n `.${moduleName}.js`,\n `.${moduleName}.cjs`,\n `.config/${moduleName}`,\n `.config/${moduleName}.json`,\n `.config/${moduleName}.jsonc`,\n `.config/${moduleName}.json5`,\n `.config/${moduleName}.yaml`,\n `.config/${moduleName}.yml`,\n `.config/${moduleName}.js`,\n `.config/${moduleName}.cjs`,\n `${moduleName}.config.js`,\n `${moduleName}.config.cjs`\n];\n\nconst searchPlaces: string[] = [\"package.json\"];\n\nfor (const moduleName of moduleNames) {\n searchPlaces.push(...generateSearchPlaces(moduleName));\n}\n\nconst json5Loader: Loader = (_filepath, content) => Promise.resolve(json5Parse(content));\n\nexport const findConfig = async (rootDir: string): Promise<unknown> => {\n const options: Partial<CosmiconfigOptions> = {\n stopDir: rootDir,\n searchPlaces,\n loaders: {\n \".json\": json5Loader,\n \".jsonc\": json5Loader,\n \".json5\": json5Loader\n }\n };\n\n const explorer = cosmiconfig(\"licensecop\", options);\n\n try {\n const result = await explorer.search(rootDir);\n\n if (!result?.config) {\n throw new Error(\"No config file found\");\n }\n\n return result.config;\n } catch (e) {\n throw ConfigError.fromUnknown(e);\n }\n};\n"],"names":["findConfig","moduleNames","generateSearchPlaces","moduleName","searchPlaces","push","json5Loader","_filepath","content","Promise","resolve","json5Parse","rootDir","options","stopDir","loaders","explorer","cosmiconfig","result","search","config","Error","e","ConfigError","fromUnknown"],"mappings":";+BAoCaA;;;eAAAA;;;6BApCsD;6BACvC;uBACD;AAE3B,2BAA2B;AAC3B,MAAMC,cAAc;IAAC;IAAY;IAAY;IAAc;CAAa;AAExE,MAAMC,uBAAuB,CAACC,aAAiC;QAC7D,CAAC,CAAC,EAAEA,WAAW,CAAC;QAChB,CAAC,CAAC,EAAEA,WAAW,KAAK,CAAC;QACrB,CAAC,CAAC,EAAEA,WAAW,MAAM,CAAC;QACtB,CAAC,CAAC,EAAEA,WAAW,MAAM,CAAC;QACtB,CAAC,CAAC,EAAEA,WAAW,KAAK,CAAC;QACrB,CAAC,CAAC,EAAEA,WAAW,IAAI,CAAC;QACpB,CAAC,CAAC,EAAEA,WAAW,GAAG,CAAC;QACnB,CAAC,CAAC,EAAEA,WAAW,IAAI,CAAC;QACpB,CAAC,QAAQ,EAAEA,WAAW,CAAC;QACvB,CAAC,QAAQ,EAAEA,WAAW,KAAK,CAAC;QAC5B,CAAC,QAAQ,EAAEA,WAAW,MAAM,CAAC;QAC7B,CAAC,QAAQ,EAAEA,WAAW,MAAM,CAAC;QAC7B,CAAC,QAAQ,EAAEA,WAAW,KAAK,CAAC;QAC5B,CAAC,QAAQ,EAAEA,WAAW,IAAI,CAAC;QAC3B,CAAC,QAAQ,EAAEA,WAAW,GAAG,CAAC;QAC1B,CAAC,QAAQ,EAAEA,WAAW,IAAI,CAAC;QAC3B,CAAC,EAAEA,WAAW,UAAU,CAAC;QACzB,CAAC,EAAEA,WAAW,WAAW,CAAC;KAC3B;AAED,MAAMC,eAAyB;IAAC;CAAe;AAE/C,KAAK,MAAMD,cAAcF,YAAa;IACpCG,aAAaC,IAAI,IAAIH,qBAAqBC;AAC5C;AAEA,MAAMG,cAAsB,CAACC,WAAWC,UAAYC,QAAQC,OAAO,CAACC,IAAAA,iBAAU,EAACH;AAExE,MAAMR,aAAa,OAAOY;IAC/B,MAAMC,UAAuC;QAC3CC,SAASF;QACTR;QACAW,SAAS;YACP,SAAST;YACT,UAAUA;YACV,UAAUA;QACZ;IACF;IAEA,MAAMU,WAAWC,IAAAA,wBAAW,EAAC,cAAcJ;IAE3C,IAAI;QACF,MAAMK,SAAS,MAAMF,SAASG,MAAM,CAACP;QAErC,IAAI,EAACM,0BAAAA,OAAQE,MAAM,GAAE;YACnB,MAAM,IAAIC,MAAM;QAClB;QAEA,OAAOH,OAAOE,MAAM;IACtB,EAAE,OAAOE,GAAG;QACV,MAAMC,wBAAW,CAACC,WAAW,CAACF;IAChC;AACF"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "loadConfig", {
|
|
3
3
|
enumerable: true,
|
|
4
|
-
get: ()
|
|
4
|
+
get: function() {
|
|
5
|
+
return loadConfig;
|
|
6
|
+
}
|
|
5
7
|
});
|
|
6
|
-
const _config = require("./config");
|
|
7
|
-
const _loadParentConfig = require("./load-parent-config");
|
|
8
8
|
const _deepmerge = require("deepmerge");
|
|
9
|
-
const _findConfig = require("./find-config");
|
|
10
9
|
const _logger = require("../logger");
|
|
10
|
+
const _config = require("./config");
|
|
11
|
+
const _findconfig = require("./find-config");
|
|
12
|
+
const _loadparentconfig = require("./load-parent-config");
|
|
11
13
|
const loadConfig = async (rootDir)=>{
|
|
12
|
-
const foundConfig = await (0,
|
|
14
|
+
const foundConfig = await (0, _findconfig.findConfig)(rootDir);
|
|
13
15
|
let config = (0, _config.parseConfig)(foundConfig);
|
|
14
16
|
while(config.extends){
|
|
15
17
|
_logger.default.verbose(`Extending config with ${config.extends}`);
|
|
16
|
-
const loadedParentConfig = await (0,
|
|
18
|
+
const loadedParentConfig = await (0, _loadparentconfig.loadParentConfig)(config.extends, rootDir);
|
|
17
19
|
const parsedParentConfig = (0, _config.parseConfig)(loadedParentConfig);
|
|
18
20
|
config = _deepmerge(parsedParentConfig, config);
|
|
19
21
|
config.extends = parsedParentConfig.extends;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/config/load-config.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/config/load-config.ts"],"sourcesContent":["import * as deepMerge from \"deepmerge\";\nimport logger from \"../logger\";\nimport { parseConfig } from \"./config\";\nimport { findConfig } from \"./find-config\";\nimport { loadParentConfig } from \"./load-parent-config\";\n\nexport const loadConfig = async (rootDir: string) => {\n const foundConfig = await findConfig(rootDir);\n\n let config = parseConfig(foundConfig);\n\n while (config.extends) {\n logger.verbose(`Extending config with ${config.extends}`);\n const loadedParentConfig = await loadParentConfig(config.extends, rootDir);\n const parsedParentConfig = parseConfig(loadedParentConfig);\n\n config = deepMerge(parsedParentConfig, config);\n config.extends = parsedParentConfig.extends;\n }\n\n return config;\n};\n"],"names":["loadConfig","rootDir","foundConfig","findConfig","config","parseConfig","extends","logger","verbose","loadedParentConfig","loadParentConfig","parsedParentConfig","deepMerge"],"mappings":";+BAMaA;;;eAAAA;;;2BANc;wBACR;wBACS;4BACD;kCACM;AAE1B,MAAMA,aAAa,OAAOC;IAC/B,MAAMC,cAAc,MAAMC,IAAAA,sBAAU,EAACF;IAErC,IAAIG,SAASC,IAAAA,mBAAW,EAACH;IAEzB,MAAOE,OAAOE,OAAO,CAAE;QACrBC,eAAM,CAACC,OAAO,CAAC,CAAC,sBAAsB,EAAEJ,OAAOE,OAAO,CAAC,CAAC;QACxD,MAAMG,qBAAqB,MAAMC,IAAAA,kCAAgB,EAACN,OAAOE,OAAO,EAAEL;QAClE,MAAMU,qBAAqBN,IAAAA,mBAAW,EAACI;QAEvCL,SAASQ,WAAUD,oBAAoBP;QACvCA,OAAOE,OAAO,GAAGK,mBAAmBL,OAAO;IAC7C;IAEA,OAAOF;AACT"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "loadParentConfig", {
|
|
3
3
|
enumerable: true,
|
|
4
|
-
get: ()
|
|
4
|
+
get: function() {
|
|
5
|
+
return loadParentConfig;
|
|
6
|
+
}
|
|
5
7
|
});
|
|
8
|
+
const _configerror = require("./config-error");
|
|
6
9
|
const _github = require("./parent-resolutions/github");
|
|
7
|
-
const _npm = require("./parent-resolutions/npm");
|
|
8
10
|
const _http = require("./parent-resolutions/http");
|
|
9
|
-
const
|
|
11
|
+
const _npm = require("./parent-resolutions/npm");
|
|
10
12
|
const loadParentConfig = async (parentConfigPath, rootDir)=>{
|
|
11
13
|
if (parentConfigPath.startsWith("npm:")) {
|
|
12
14
|
const packageName = parentConfigPath.substring(4);
|
|
@@ -22,7 +24,7 @@ const loadParentConfig = async (parentConfigPath, rootDir)=>{
|
|
|
22
24
|
if (await (0, _npm.nodeModuleExists)(parentConfigPath, rootDir)) {
|
|
23
25
|
return await (0, _npm.npmResolution)(parentConfigPath, rootDir);
|
|
24
26
|
}
|
|
25
|
-
throw new
|
|
27
|
+
throw new _configerror.ConfigError(`Invalid parent config location: ${parentConfigPath}`);
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
//# sourceMappingURL=load-parent-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/config/load-parent-config.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/license-cop/src/lib/config/load-parent-config.ts"],"sourcesContent":["import { ConfigError } from \"./config-error\";\nimport { githubResolution } from \"./parent-resolutions/github\";\nimport { httpResolution } from \"./parent-resolutions/http\";\nimport { nodeModuleExists, npmResolution } from \"./parent-resolutions/npm\";\n\nexport const loadParentConfig = async (\n parentConfigPath: string,\n rootDir: string\n): Promise<unknown> => {\n if (parentConfigPath.startsWith(\"npm:\")) {\n const packageName = parentConfigPath.substring(4);\n return await npmResolution(packageName, rootDir);\n }\n\n if (parentConfigPath.startsWith(\"github:\")) {\n const repo = parentConfigPath.substring(7);\n return await githubResolution(repo);\n }\n\n if (parentConfigPath.startsWith(\"http\")) {\n return await httpResolution(parentConfigPath);\n }\n\n if (await nodeModuleExists(parentConfigPath, rootDir)) {\n return await npmResolution(parentConfigPath, rootDir);\n }\n\n throw new ConfigError(`Invalid parent config location: ${parentConfigPath}`);\n};\n"],"names":["loadParentConfig","parentConfigPath","rootDir","startsWith","packageName","substring","npmResolution","repo","githubResolution","httpResolution","nodeModuleExists","ConfigError"],"mappings":";+BAKaA;;;eAAAA;;;6BALe;wBACK;sBACF;qBACiB;AAEzC,MAAMA,mBAAmB,OAC9BC,kBACAC;IAEA,IAAID,iBAAiBE,UAAU,CAAC,SAAS;QACvC,MAAMC,cAAcH,iBAAiBI,SAAS,CAAC;QAC/C,OAAO,MAAMC,IAAAA,kBAAa,EAACF,aAAaF;IAC1C;IAEA,IAAID,iBAAiBE,UAAU,CAAC,YAAY;QAC1C,MAAMI,OAAON,iBAAiBI,SAAS,CAAC;QACxC,OAAO,MAAMG,IAAAA,wBAAgB,EAACD;IAChC;IAEA,IAAIN,iBAAiBE,UAAU,CAAC,SAAS;QACvC,OAAO,MAAMM,IAAAA,oBAAc,EAACR;IAC9B;IAEA,IAAI,MAAMS,IAAAA,qBAAgB,EAACT,kBAAkBC,UAAU;QACrD,OAAO,MAAMI,IAAAA,kBAAa,EAACL,kBAAkBC;IAC/C;IAEA,MAAM,IAAIS,wBAAW,CAAC,CAAC,gCAAgC,EAAEV,iBAAiB,CAAC;AAC7E"}
|