dmg-builder 26.12.0 → 26.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/dmgLicense.js CHANGED
@@ -7,6 +7,7 @@ const dmg_license_1 = require("dmg-license");
7
7
  const fs_extra_1 = require("fs-extra");
8
8
  const js_yaml_1 = require("js-yaml");
9
9
  const licenseButtons_1 = require("./licenseButtons");
10
+ const builder_util_runtime_1 = require("builder-util-runtime");
10
11
  async function addLicenseToDmg(packager, dmgPath) {
11
12
  const licenseFiles = await (0, license_1.getLicenseFiles)(packager);
12
13
  if (licenseFiles.length === 0) {
@@ -35,7 +36,7 @@ async function addLicenseToDmg(packager, dmgPath) {
35
36
  label.message = label.description;
36
37
  delete label.description;
37
38
  }
38
- jsonFile.labels.push((0, builder_util_1.deepAssign)({ lang: button.langWithRegion.replace("_", "-") }, label));
39
+ jsonFile.labels.push((0, builder_util_runtime_1.deepAssign)({ lang: button.langWithRegion.replace("_", "-") }, label));
39
40
  }
40
41
  await (0, dmg_license_1.dmgLicenseFromJSON)(dmgPath, jsonFile, {
41
42
  onNonFatalError: builder_util_1.log.warn.bind(builder_util_1.log),
@@ -1 +1 @@
1
- {"version":3,"file":"dmgLicense.js","sourceRoot":"","sources":["../src/dmgLicense.ts"],"names":[],"mappings":";;AAgBA,0CAwCC;AAvDD,8DAAkE;AAClE,+CAA8C;AAC9C,6CAAgD;AAChD,uCAA6C;AAC7C,qCAA2C;AAC3C,qDAAwD;AAUjD,KAAK,UAAU,eAAe,CAAC,QAA+B,EAAE,OAAe;IACpF,MAAM,YAAY,GAAG,MAAM,IAAA,yBAAe,EAAC,QAAQ,CAAC,CAAA;IACpD,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,kBAAkB,GAAG,MAAM,IAAA,sCAAqB,EAAC,QAAQ,CAAC,CAAA;IAChE,QAAQ,CAAC,WAA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C,OAAO,EAAE,QAAQ,EAAE;QAC1C,eAAe,EAAE,kBAAG,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAG,CAAC;KACpC,CAAC,CAAA;IAEF,OAAO,QAAQ,CAAA;AACjB,CAAC","sourcesContent":["import { PlatformPackager } from \"app-builder-lib\"\nimport { getLicenseFiles } from \"app-builder-lib/out/util/license\"\nimport { deepAssign, log } from \"builder-util\"\nimport { dmgLicenseFromJSON } from \"dmg-license\"\nimport { readFile, readJson } from \"fs-extra\"\nimport { CORE_SCHEMA, load } from \"js-yaml\"\nimport { getLicenseButtonsFile } from \"./licenseButtons\"\n\n// License Specifications\n// https://github.com/argv-minus-one/dmg-license/blob/HEAD/docs/License%20Specifications.md\ntype LicenseConfig = {\n $schema: string\n body: any[]\n labels: any[]\n}\n\nexport async function addLicenseToDmg(packager: PlatformPackager<any>, dmgPath: string): Promise<LicenseConfig | null> {\n const licenseFiles = await getLicenseFiles(packager)\n if (licenseFiles.length === 0) {\n return null\n }\n\n const licenseButtonFiles = await getLicenseButtonsFile(packager)\n packager.debugLogger.add(\"dmg.licenseFiles\", licenseFiles)\n packager.debugLogger.add(\"dmg.licenseButtons\", licenseButtonFiles)\n\n const jsonFile: LicenseConfig = {\n $schema: \"https://github.com/argv-minus-one/dmg-license/raw/master/schema.json\",\n // defaultLang: '',\n body: [],\n labels: [],\n }\n\n for (const file of licenseFiles) {\n jsonFile.body.push({\n file: file.file,\n lang: file.langWithRegion.replace(\"_\", \"-\"),\n })\n }\n\n for (const button of licenseButtonFiles) {\n const filepath = button.file\n const label: any = filepath.endsWith(\".yml\") ? load(await readFile(filepath, \"utf-8\"), { schema: CORE_SCHEMA }) : await readJson(filepath)\n if (label.description) {\n // to support original button file format\n label.message = label.description\n delete label.description\n }\n jsonFile.labels.push(deepAssign({ lang: button.langWithRegion.replace(\"_\", \"-\") }, label))\n }\n\n await dmgLicenseFromJSON(dmgPath, jsonFile, {\n onNonFatalError: log.warn.bind(log),\n })\n\n return jsonFile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AQ,EAAE,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,qBAAW,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,IAAA,mBAAQ,EAAC,QAAQ,CAAC,CAAA;QAC1I,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,yCAAyC;YACzC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,WAAW,CAAA;YACjC,OAAO,KAAK,CAAC,WAAW,CAAA;QAC1B,CAAC;QACD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAA,iCAAU,EAAC,EAAE,IAAI,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAA;IAC5F,CAAC;IAED,MAAM,IAAA,gCAAkB,EAAC,OAAO,EAAE,QAAQ,EAAE;QAC1C,eAAe,EAAE,kBAAG,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAG,CAAC;KACpC,CAAC,CAAA;IAEF,OAAO,QAAQ,CAAA;AACjB,CAAC","sourcesContent":["import { PlatformPackager } from \"app-builder-lib\"\nimport { getLicenseFiles } from \"app-builder-lib/out/util/license\"\nimport { log } from \"builder-util\"\nimport { dmgLicenseFromJSON } from \"dmg-license\"\nimport { readFile, readJson } from \"fs-extra\"\nimport { CORE_SCHEMA, load } from \"js-yaml\"\nimport { getLicenseButtonsFile } from \"./licenseButtons\"\nimport { deepAssign } from \"builder-util-runtime\"\n\n// License Specifications\n// https://github.com/argv-minus-one/dmg-license/blob/HEAD/docs/License%20Specifications.md\ntype LicenseConfig = {\n $schema: string\n body: any[]\n labels: any[]\n}\n\nexport async function addLicenseToDmg(packager: PlatformPackager<any>, dmgPath: string): Promise<LicenseConfig | null> {\n const licenseFiles = await getLicenseFiles(packager)\n if (licenseFiles.length === 0) {\n return null\n }\n\n const licenseButtonFiles = await getLicenseButtonsFile(packager)\n packager.debugLogger.add(\"dmg.licenseFiles\", licenseFiles)\n packager.debugLogger.add(\"dmg.licenseButtons\", licenseButtonFiles)\n\n const jsonFile: LicenseConfig = {\n $schema: \"https://github.com/argv-minus-one/dmg-license/raw/master/schema.json\",\n // defaultLang: '',\n body: [],\n labels: [],\n }\n\n for (const file of licenseFiles) {\n jsonFile.body.push({\n file: file.file,\n lang: file.langWithRegion.replace(\"_\", \"-\"),\n })\n }\n\n for (const button of licenseButtonFiles) {\n const filepath = button.file\n const label: any = filepath.endsWith(\".yml\") ? load(await readFile(filepath, \"utf-8\"), { schema: CORE_SCHEMA }) : await readJson(filepath)\n if (label.description) {\n // to support original button file format\n label.message = label.description\n delete label.description\n }\n jsonFile.labels.push(deepAssign({ lang: button.langWithRegion.replace(\"_\", \"-\") }, label))\n }\n\n await dmgLicenseFromJSON(dmgPath, jsonFile, {\n onNonFatalError: log.warn.bind(log),\n })\n\n return jsonFile\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dmg-builder",
3
- "version": "26.12.0",
3
+ "version": "26.12.1",
4
4
  "main": "out/dmgUtil.js",
5
5
  "author": "Vladimir Krivosheev",
6
6
  "license": "MIT",
@@ -19,8 +19,8 @@
19
19
  "fs-extra": "^10.1.0",
20
20
  "iconv-lite": "^0.6.2",
21
21
  "js-yaml": "^4.1.0",
22
- "app-builder-lib": "26.12.0",
23
- "builder-util": "26.12.0"
22
+ "app-builder-lib": "26.12.1",
23
+ "builder-util": "26.12.1"
24
24
  },
25
25
  "optionalDependencies": {
26
26
  "dmg-license": "^1.0.11"