@gtkx/cli 1.1.0 → 1.2.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.
Files changed (153) hide show
  1. package/dist/builder.d.ts.map +1 -1
  2. package/dist/builder.js +2 -0
  3. package/dist/builder.js.map +1 -1
  4. package/dist/codegen/report.d.ts.map +1 -1
  5. package/dist/codegen/report.js +3 -0
  6. package/dist/codegen/report.js.map +1 -1
  7. package/dist/codegen/run-codegen.d.ts +1 -0
  8. package/dist/codegen/run-codegen.d.ts.map +1 -1
  9. package/dist/codegen/run-codegen.js +7 -1
  10. package/dist/codegen/run-codegen.js.map +1 -1
  11. package/dist/commands/docs.d.ts.map +1 -1
  12. package/dist/commands/docs.js +1 -0
  13. package/dist/commands/docs.js.map +1 -1
  14. package/dist/deploy/freedesktop/copyright.d.ts +2 -2
  15. package/dist/deploy/freedesktop/copyright.d.ts.map +1 -1
  16. package/dist/deploy/freedesktop/copyright.js +105 -14
  17. package/dist/deploy/freedesktop/copyright.js.map +1 -1
  18. package/dist/deploy/install-hints.d.ts.map +1 -1
  19. package/dist/deploy/install-hints.js +7 -4
  20. package/dist/deploy/install-hints.js.map +1 -1
  21. package/dist/deploy/node-runtime/download.d.ts +5 -1
  22. package/dist/deploy/node-runtime/download.d.ts.map +1 -1
  23. package/dist/deploy/node-runtime/download.js +6 -3
  24. package/dist/deploy/node-runtime/download.js.map +1 -1
  25. package/dist/deploy/node-runtime/index.d.ts +2 -1
  26. package/dist/deploy/node-runtime/index.d.ts.map +1 -1
  27. package/dist/deploy/node-runtime/index.js +10 -9
  28. package/dist/deploy/node-runtime/index.js.map +1 -1
  29. package/dist/deploy/node-runtime/license.d.ts +4 -0
  30. package/dist/deploy/node-runtime/license.d.ts.map +1 -0
  31. package/dist/deploy/node-runtime/license.js +19 -0
  32. package/dist/deploy/node-runtime/license.js.map +1 -0
  33. package/dist/deploy/notices/collect.d.ts +8 -0
  34. package/dist/deploy/notices/collect.d.ts.map +1 -0
  35. package/dist/deploy/notices/collect.js +17 -0
  36. package/dist/deploy/notices/collect.js.map +1 -0
  37. package/dist/deploy/notices/dependencies.d.ts +5 -0
  38. package/dist/deploy/notices/dependencies.d.ts.map +1 -0
  39. package/dist/deploy/notices/dependencies.js +39 -0
  40. package/dist/deploy/notices/dependencies.js.map +1 -0
  41. package/dist/deploy/notices/gtkx.d.ts +6 -0
  42. package/dist/deploy/notices/gtkx.d.ts.map +1 -0
  43. package/dist/deploy/notices/gtkx.js +68 -0
  44. package/dist/deploy/notices/gtkx.js.map +1 -0
  45. package/dist/deploy/notices/libraries.d.ts +4 -0
  46. package/dist/deploy/notices/libraries.d.ts.map +1 -0
  47. package/dist/deploy/notices/libraries.js +60 -0
  48. package/dist/deploy/notices/libraries.js.map +1 -0
  49. package/dist/deploy/notices/node-runtime.d.ts +4 -0
  50. package/dist/deploy/notices/node-runtime.d.ts.map +1 -0
  51. package/dist/deploy/notices/node-runtime.js +78 -0
  52. package/dist/deploy/notices/node-runtime.js.map +1 -0
  53. package/dist/deploy/notices/packages.d.ts +13 -0
  54. package/dist/deploy/notices/packages.d.ts.map +1 -0
  55. package/dist/deploy/notices/packages.js +115 -0
  56. package/dist/deploy/notices/packages.js.map +1 -0
  57. package/dist/deploy/notices/render.d.ts +4 -0
  58. package/dist/deploy/notices/render.d.ts.map +1 -0
  59. package/dist/deploy/notices/render.js +41 -0
  60. package/dist/deploy/notices/render.js.map +1 -0
  61. package/dist/deploy/notices/text.d.ts +5 -0
  62. package/dist/deploy/notices/text.d.ts.map +1 -0
  63. package/dist/deploy/notices/text.js +34 -0
  64. package/dist/deploy/notices/text.js.map +1 -0
  65. package/dist/deploy/payload/copy-tree.d.ts +2 -1
  66. package/dist/deploy/payload/copy-tree.d.ts.map +1 -1
  67. package/dist/deploy/payload/copy-tree.js +3 -1
  68. package/dist/deploy/payload/copy-tree.js.map +1 -1
  69. package/dist/deploy/payload/stage.d.ts +7 -3
  70. package/dist/deploy/payload/stage.d.ts.map +1 -1
  71. package/dist/deploy/payload/stage.js +25 -14
  72. package/dist/deploy/payload/stage.js.map +1 -1
  73. package/dist/deploy/run-deploy.d.ts.map +1 -1
  74. package/dist/deploy/run-deploy.js +28 -7
  75. package/dist/deploy/run-deploy.js.map +1 -1
  76. package/dist/deploy/settings/extra-files.d.ts +4 -0
  77. package/dist/deploy/settings/extra-files.d.ts.map +1 -0
  78. package/dist/deploy/settings/extra-files.js +11 -0
  79. package/dist/deploy/settings/extra-files.js.map +1 -0
  80. package/dist/deploy/settings/index.d.ts.map +1 -1
  81. package/dist/deploy/settings/index.js +2 -1
  82. package/dist/deploy/settings/index.js.map +1 -1
  83. package/dist/deploy/settings/package-manifest.d.ts +2 -0
  84. package/dist/deploy/settings/package-manifest.d.ts.map +1 -1
  85. package/dist/deploy/settings/package-manifest.js +8 -0
  86. package/dist/deploy/settings/package-manifest.js.map +1 -1
  87. package/dist/deploy/settings/paths.d.ts +2 -1
  88. package/dist/deploy/settings/paths.d.ts.map +1 -1
  89. package/dist/deploy/settings/paths.js +1 -1
  90. package/dist/deploy/settings/paths.js.map +1 -1
  91. package/dist/deploy/targets/flatpak-manifest.d.ts +3 -1
  92. package/dist/deploy/targets/flatpak-manifest.d.ts.map +1 -1
  93. package/dist/deploy/targets/flatpak-manifest.js +50 -4
  94. package/dist/deploy/targets/flatpak-manifest.js.map +1 -1
  95. package/dist/deploy/targets/flatpak-pnpm.d.ts +15 -0
  96. package/dist/deploy/targets/flatpak-pnpm.d.ts.map +1 -0
  97. package/dist/deploy/targets/flatpak-pnpm.js +69 -0
  98. package/dist/deploy/targets/flatpak-pnpm.js.map +1 -0
  99. package/dist/deploy/targets/flatpak-source.d.ts.map +1 -1
  100. package/dist/deploy/targets/flatpak-source.js +70 -7
  101. package/dist/deploy/targets/flatpak-source.js.map +1 -1
  102. package/dist/deploy/targets/flatpak-sources.d.ts +5 -3
  103. package/dist/deploy/targets/flatpak-sources.d.ts.map +1 -1
  104. package/dist/deploy/targets/flatpak-sources.js +23 -9
  105. package/dist/deploy/targets/flatpak-sources.js.map +1 -1
  106. package/dist/deploy/targets/flatpak.d.ts.map +1 -1
  107. package/dist/deploy/targets/flatpak.js +3 -2
  108. package/dist/deploy/targets/flatpak.js.map +1 -1
  109. package/dist/deploy/tools.d.ts +3 -1
  110. package/dist/deploy/tools.d.ts.map +1 -1
  111. package/dist/deploy/tools.js +17 -3
  112. package/dist/deploy/tools.js.map +1 -1
  113. package/dist/deploy/types.d.ts +22 -2
  114. package/dist/deploy/types.d.ts.map +1 -1
  115. package/dist/deploy/types.js.map +1 -1
  116. package/dist/vite-plugins/bundled-packages.d.ts +5 -0
  117. package/dist/vite-plugins/bundled-packages.d.ts.map +1 -0
  118. package/dist/vite-plugins/bundled-packages.js +63 -0
  119. package/dist/vite-plugins/bundled-packages.js.map +1 -0
  120. package/package.json +9 -9
  121. package/src/builder.ts +2 -0
  122. package/src/codegen/report.ts +4 -0
  123. package/src/codegen/run-codegen.ts +11 -1
  124. package/src/commands/docs.ts +1 -0
  125. package/src/deploy/freedesktop/copyright.ts +153 -18
  126. package/src/deploy/install-hints.ts +9 -6
  127. package/src/deploy/node-runtime/download.ts +13 -4
  128. package/src/deploy/node-runtime/index.ts +17 -11
  129. package/src/deploy/node-runtime/license.ts +24 -0
  130. package/src/deploy/notices/collect.ts +26 -0
  131. package/src/deploy/notices/dependencies.ts +53 -0
  132. package/src/deploy/notices/gtkx.ts +92 -0
  133. package/src/deploy/notices/libraries.ts +81 -0
  134. package/src/deploy/notices/node-runtime.ts +101 -0
  135. package/src/deploy/notices/packages.ts +168 -0
  136. package/src/deploy/notices/render.ts +52 -0
  137. package/src/deploy/notices/text.ts +42 -0
  138. package/src/deploy/payload/copy-tree.ts +5 -1
  139. package/src/deploy/payload/stage.ts +40 -16
  140. package/src/deploy/run-deploy.ts +34 -6
  141. package/src/deploy/settings/extra-files.ts +21 -0
  142. package/src/deploy/settings/index.ts +2 -1
  143. package/src/deploy/settings/package-manifest.ts +12 -0
  144. package/src/deploy/settings/paths.ts +1 -1
  145. package/src/deploy/targets/flatpak-manifest.ts +69 -4
  146. package/src/deploy/targets/flatpak-pnpm.ts +115 -0
  147. package/src/deploy/targets/flatpak-source.ts +105 -6
  148. package/src/deploy/targets/flatpak-sources.ts +36 -9
  149. package/src/deploy/targets/flatpak.ts +3 -2
  150. package/src/deploy/tools.ts +23 -2
  151. package/src/deploy/types.ts +27 -1
  152. package/src/vite-plugins/bundled-packages.ts +95 -0
  153. package/LICENSE +0 -373
@@ -1,4 +1,5 @@
1
1
  import type { DeploySettings, NodeRuntime } from "../types.js";
2
+ declare const sourcePathFor: (settings: DeploySettings) => string;
2
3
  declare const resolveNodeRuntime: (settings: DeploySettings) => Promise<NodeRuntime>;
3
- export { resolveNodeRuntime };
4
+ export { resolveNodeRuntime, sourcePathFor };
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deploy/node-runtime/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAgE/D,QAAA,MAAM,kBAAkB,GAAU,UAAU,cAAc,KAAG,OAAO,CAAC,WAAW,CAU/E,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deploy/node-runtime/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAgB/D,QAAA,MAAM,aAAa,GAAI,UAAU,cAAc,KAAG,MAajD,CAAC;AAyCF,QAAA,MAAM,kBAAkB,GAAU,UAAU,cAAc,KAAG,OAAO,CAAC,WAAW,CAU/E,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,CAAC"}
@@ -5,6 +5,7 @@ import { runCliTool } from "../../internal/run-cli-tool.js";
5
5
  import { downloadNode } from "./download.js";
6
6
  import { readElfInfo } from "./elf.js";
7
7
  import { assertPortableNode } from "./guard.js";
8
+ import { licenseBesideNode } from "./license.js";
8
9
  const BYTES_PER_MIB = 1024 * 1024;
9
10
  const EXECUTABLE_MODE = 0o755;
10
11
  const NODE_FILENAME = "node";
@@ -35,9 +36,9 @@ const stageNode = (settings, sourcePath) => {
35
36
  return staged;
36
37
  };
37
38
  const stageDownloadedNode = async (settings, version) => {
38
- const staged = await downloadNode(version, settings.arch.node, settings.paths.runtime);
39
- chmodSync(staged, EXECUTABLE_MODE);
40
- return staged;
39
+ const downloaded = await downloadNode(version, settings.arch.node, settings.paths.runtime);
40
+ chmodSync(downloaded.path, EXECUTABLE_MODE);
41
+ return downloaded;
41
42
  };
42
43
  const stageFromSource = async (settings, version, source) => {
43
44
  if (source === "download") {
@@ -45,17 +46,17 @@ const stageFromSource = async (settings, version, source) => {
45
46
  }
46
47
  const sourcePath = sourcePathFor(settings);
47
48
  assertPortableNode(readElfInfo(sourcePath), source);
48
- return stageNode(settings, sourcePath);
49
+ return { path: stageNode(settings, sourcePath), licenseFile: licenseBesideNode(sourcePath) };
49
50
  };
50
51
  const resolveNodeRuntime = async (settings) => {
51
52
  const node = settings.deploy.node ?? {};
52
53
  const source = node.source ?? "download";
53
54
  const version = node.version ?? process.versions.node;
54
55
  const staged = await stageFromSource(settings, version, source);
55
- const isStripped = node.shouldStrip === false ? false : didStripBinary(staged);
56
- const elf = readElfInfo(staged);
57
- info(`Bundled Node.js v${version} (${megabytes(staged)} MiB, glibc >= ${elf.glibcFloor ?? "unknown"})`);
58
- return { path: staged, version, glibcFloor: elf.glibcFloor, isStripped };
56
+ const isStripped = node.shouldStrip === false ? false : didStripBinary(staged.path);
57
+ const elf = readElfInfo(staged.path);
58
+ info(`Bundled Node.js v${version} (${megabytes(staged.path)} MiB, glibc >= ${elf.glibcFloor ?? "unknown"})`);
59
+ return { ...staged, version, glibcFloor: elf.glibcFloor, isStripped };
59
60
  };
60
- export { resolveNodeRuntime };
61
+ export { resolveNodeRuntime, sourcePathFor };
61
62
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/deploy/node-runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;AAClC,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B,MAAM,aAAa,GAAG,CAAC,QAAwB,EAAU,EAAE;IACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,CAAC;IAEzC,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC5B,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,2FAA2F,CAAC,CAAC;IACjH,CAAC;IAED,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,IA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MAAM,KAAK,UAAU,EAAE,CAAC;QACxB,OAAO,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC3C,kBAAkB,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,CAAC;IAEpD,OAAO,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AAC3C,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,KAAK,EAAE,QAAwB,EAAwB,EAAE;IAChF,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,CAAC;IACzC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;IACtD,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC/E,MAAM,GAAG,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,oBAAoB,OAAO,KAAK,SAAS,CAAC,MAAM,CAAC,kBAAkB,GAAG,CAAC,UAAU,IAAI,SAAS,GAAG,CAAC,CAAC;IAExG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC;AAC7E,CAAC,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC","sourcesContent":["import { info, tryResolveExecutable } from \"@gtkx/utils\";\nimport { chmodSync, copyFileSync, mkdirSync, statSync } from \"node:fs\";\nimport { join, resolve } from \"node:path\";\nimport type { DeploySettings, NodeRuntime } from \"../types.js\";\nimport { runCliTool } from \"../../internal/run-cli-tool.js\";\nimport { downloadNode } from \"./download.js\";\nimport { readElfInfo } from \"./elf.js\";\nimport { assertPortableNode } from \"./guard.js\";\n\nconst BYTES_PER_MIB = 1024 * 1024;\nconst EXECUTABLE_MODE = 0o755;\nconst NODE_FILENAME = \"node\";\n\nconst sourcePathFor = (settings: DeploySettings): string => {\n const node = settings.deploy.node ?? {};\n const source = node.source ?? \"download\";\n\n if (source === \"host\") {\n return process.execPath;\n }\n\n if (node.path === undefined) {\n throw new Error('Cannot resolve the Node.js runtime: `deploy.node.source: \"path\"` needs `deploy.node.path`');\n }\n\n return resolve(settings.paths.root, node.path);\n};\n\nconst didStripBinary = (path: string): boolean => {\n if (tryResolveExecutable(\"strip\") === undefined) {\n return false;\n }\n\n runCliTool({ tool: \"strip\", args: [\"--strip-unneeded\", path], target: \"the bundled Node.js\" });\n\n return true;\n};\n\nconst megabytes = (path: string): string => (statSync(path).size / BYTES_PER_MIB).toFixed(1);\n\nconst stageNode = (settings: DeploySettings, sourcePath: string): string => {\n mkdirSync(settings.paths.runtime, { recursive: true });\n const staged = join(settings.paths.runtime, NODE_FILENAME);\n copyFileSync(sourcePath, staged);\n chmodSync(staged, EXECUTABLE_MODE);\n\n return staged;\n};\n\nconst stageDownloadedNode = async (settings: DeploySettings, version: string): Promise<string> => {\n const staged = await downloadNode(version, settings.arch.node, settings.paths.runtime);\n chmodSync(staged, EXECUTABLE_MODE);\n\n return staged;\n};\n\nconst stageFromSource = async (settings: DeploySettings, version: string, source: string): Promise<string> => {\n if (source === \"download\") {\n return stageDownloadedNode(settings, version);\n }\n\n const sourcePath = sourcePathFor(settings);\n assertPortableNode(readElfInfo(sourcePath), source);\n\n return stageNode(settings, sourcePath);\n};\n\nconst resolveNodeRuntime = async (settings: DeploySettings): Promise<NodeRuntime> => {\n const node = settings.deploy.node ?? {};\n const source = node.source ?? \"download\";\n const version = node.version ?? process.versions.node;\n const staged = await stageFromSource(settings, version, source);\n const isStripped = node.shouldStrip === false ? false : didStripBinary(staged);\n const elf = readElfInfo(staged);\n info(`Bundled Node.js v${version} (${megabytes(staged)} MiB, glibc >= ${elf.glibcFloor ?? \"unknown\"})`);\n\n return { path: staged, version, glibcFloor: elf.glibcFloor, isStripped };\n};\n\nexport { resolveNodeRuntime };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/deploy/node-runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAOjD,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;AAClC,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B,MAAM,aAAa,GAAG,CAAC,QAAwB,EAAU,EAAE;IACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,CAAC;IAEzC,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC5B,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QA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GAAG,CAAC,UAAU,IAAI,SAAS,GAAG,CAAC,CAAC;IAE7G,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC;AAC1E,CAAC,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,CAAC","sourcesContent":["import { info, tryResolveExecutable } from \"@gtkx/utils\";\nimport { chmodSync, copyFileSync, mkdirSync, statSync } from \"node:fs\";\nimport { join, resolve } from \"node:path\";\nimport type { DeploySettings, NodeRuntime } from \"../types.js\";\nimport { runCliTool } from \"../../internal/run-cli-tool.js\";\nimport { downloadNode } from \"./download.js\";\nimport { readElfInfo } from \"./elf.js\";\nimport { assertPortableNode } from \"./guard.js\";\nimport { licenseBesideNode } from \"./license.js\";\n\ntype StagedRuntime = {\n path: string;\n licenseFile: string | null;\n};\n\nconst BYTES_PER_MIB = 1024 * 1024;\nconst EXECUTABLE_MODE = 0o755;\nconst NODE_FILENAME = \"node\";\n\nconst sourcePathFor = (settings: DeploySettings): string => {\n const node = settings.deploy.node ?? {};\n const source = node.source ?? \"download\";\n\n if (source === \"host\") {\n return process.execPath;\n }\n\n if (node.path === undefined) {\n throw new Error('Cannot resolve the Node.js runtime: `deploy.node.source: \"path\"` needs `deploy.node.path`');\n }\n\n return resolve(settings.paths.root, node.path);\n};\n\nconst didStripBinary = (path: string): boolean => {\n if (tryResolveExecutable(\"strip\") === undefined) {\n return false;\n }\n\n runCliTool({ tool: \"strip\", args: [\"--strip-unneeded\", path], target: \"the bundled Node.js\" });\n\n return true;\n};\n\nconst megabytes = (path: string): string => (statSync(path).size / BYTES_PER_MIB).toFixed(1);\n\nconst stageNode = (settings: DeploySettings, sourcePath: string): string => {\n mkdirSync(settings.paths.runtime, { recursive: true });\n const staged = join(settings.paths.runtime, NODE_FILENAME);\n copyFileSync(sourcePath, staged);\n chmodSync(staged, EXECUTABLE_MODE);\n\n return staged;\n};\n\nconst stageDownloadedNode = async (settings: DeploySettings, version: string): Promise<StagedRuntime> => {\n const downloaded = await downloadNode(version, settings.arch.node, settings.paths.runtime);\n chmodSync(downloaded.path, EXECUTABLE_MODE);\n\n return downloaded;\n};\n\nconst stageFromSource = async (settings: DeploySettings, version: string, source: string): Promise<StagedRuntime> => {\n if (source === \"download\") {\n return stageDownloadedNode(settings, version);\n }\n\n const sourcePath = sourcePathFor(settings);\n assertPortableNode(readElfInfo(sourcePath), source);\n\n return { path: stageNode(settings, sourcePath), licenseFile: licenseBesideNode(sourcePath) };\n};\n\nconst resolveNodeRuntime = async (settings: DeploySettings): Promise<NodeRuntime> => {\n const node = settings.deploy.node ?? {};\n const source = node.source ?? \"download\";\n const version = node.version ?? process.versions.node;\n const staged = await stageFromSource(settings, version, source);\n const isStripped = node.shouldStrip === false ? false : didStripBinary(staged.path);\n const elf = readElfInfo(staged.path);\n info(`Bundled Node.js v${version} (${megabytes(staged.path)} MiB, glibc >= ${elf.glibcFloor ?? \"unknown\"})`);\n\n return { ...staged, version, glibcFloor: elf.glibcFloor, isStripped };\n};\n\nexport { resolveNodeRuntime, sourcePathFor };\n"]}
@@ -0,0 +1,4 @@
1
+ declare const LICENSE_FILENAME = "LICENSE";
2
+ declare const licenseBesideNode: (binary: string) => string | null;
3
+ export { LICENSE_FILENAME, licenseBesideNode };
4
+ //# sourceMappingURL=license.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../../src/deploy/node-runtime/license.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,gBAAgB,YAAY,CAAC;AAiBnC,QAAA,MAAM,iBAAiB,GAAI,QAAQ,MAAM,KAAG,MAAM,GAAG,IAC8B,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+ const LICENSE_FILENAME = "LICENSE";
4
+ const NODE_MARKER = "Node.js";
5
+ const licenseCandidates = (binary) => {
6
+ const dir = dirname(binary);
7
+ return [join(dir, LICENSE_FILENAME), join(dir, "..", LICENSE_FILENAME)];
8
+ };
9
+ const isNodeLicense = (path) => {
10
+ try {
11
+ return readFileSync(path, "utf8").includes(NODE_MARKER);
12
+ }
13
+ catch {
14
+ return false;
15
+ }
16
+ };
17
+ const licenseBesideNode = (binary) => licenseCandidates(binary).find((candidate) => isNodeLicense(candidate)) ?? null;
18
+ export { LICENSE_FILENAME, licenseBesideNode };
19
+ //# sourceMappingURL=license.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.js","sourceRoot":"","sources":["../../../src/deploy/node-runtime/license.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,MAAM,WAAW,GAAG,SAAS,CAAC;AAE9B,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAY,EAAE;IACnD,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE5B,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,IAAY,EAAW,EAAE;IAC5C,IAAI,CAAC;QACD,OAAO,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC5D,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAiB,EAAE,CACxD,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,IAAI,IAAI,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["import { readFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\n\nconst LICENSE_FILENAME = \"LICENSE\";\nconst NODE_MARKER = \"Node.js\";\n\nconst licenseCandidates = (binary: string): string[] => {\n const dir = dirname(binary);\n\n return [join(dir, LICENSE_FILENAME), join(dir, \"..\", LICENSE_FILENAME)];\n};\n\nconst isNodeLicense = (path: string): boolean => {\n try {\n return readFileSync(path, \"utf8\").includes(NODE_MARKER);\n } catch {\n return false;\n }\n};\n\nconst licenseBesideNode = (binary: string): string | null =>\n licenseCandidates(binary).find((candidate) => isNodeLicense(candidate)) ?? null;\n\nexport { LICENSE_FILENAME, licenseBesideNode };\n"]}
@@ -0,0 +1,8 @@
1
+ import type { DeploySettings, NodeRuntime, NoticeSection } from "../types.js";
2
+ type NoticeRequest = {
3
+ settings: DeploySettings;
4
+ node: NodeRuntime | null;
5
+ };
6
+ declare const collectNotices: ({ settings, node }: NoticeRequest) => NoticeSection[];
7
+ export { collectNotices };
8
+ //# sourceMappingURL=collect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect.d.ts","sourceRoot":"","sources":["../../../src/deploy/notices/collect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO9E,KAAK,aAAa,GAAG;IACjB,QAAQ,EAAE,cAAc,CAAC;IACzB,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,cAAc,GAAI,oBAAoB,aAAa,KAAG,aAAa,EAWxE,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { dependencyNotices } from "./dependencies.js";
2
+ import { gtkxNotices } from "./gtkx.js";
3
+ import { libraryNotices } from "./libraries.js";
4
+ import { nodeNotices } from "./node-runtime.js";
5
+ import { bundledPackages } from "./packages.js";
6
+ const collectNotices = ({ settings, node }) => {
7
+ const packages = bundledPackages(settings);
8
+ const sections = [
9
+ nodeNotices(settings, node),
10
+ gtkxNotices(settings, packages),
11
+ dependencyNotices(settings, packages),
12
+ libraryNotices(settings),
13
+ ];
14
+ return sections.filter((section) => section.notices.length > 0);
15
+ };
16
+ export { collectNotices };
17
+ //# sourceMappingURL=collect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect.js","sourceRoot":"","sources":["../../../src/deploy/notices/collect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOhD,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAiB,EAAmB,EAAE;IAC1E,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAE3C,MAAM,QAAQ,GAAG;QACb,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC;QAC3B,WAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAC/B,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC;QACrC,cAAc,CAAC,QAAQ,CAAC;KAC3B,CAAC;IAEF,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import type { DeploySettings, NodeRuntime, NoticeSection } from \"../types.js\";\nimport { dependencyNotices } from \"./dependencies.js\";\nimport { gtkxNotices } from \"./gtkx.js\";\nimport { libraryNotices } from \"./libraries.js\";\nimport { nodeNotices } from \"./node-runtime.js\";\nimport { bundledPackages } from \"./packages.js\";\n\ntype NoticeRequest = {\n settings: DeploySettings;\n node: NodeRuntime | null;\n};\n\nconst collectNotices = ({ settings, node }: NoticeRequest): NoticeSection[] => {\n const packages = bundledPackages(settings);\n\n const sections = [\n nodeNotices(settings, node),\n gtkxNotices(settings, packages),\n dependencyNotices(settings, packages),\n libraryNotices(settings),\n ];\n\n return sections.filter((section) => section.notices.length > 0);\n};\n\nexport { collectNotices };\n"]}
@@ -0,0 +1,5 @@
1
+ import type { DeploySettings, NoticeSection } from "../types.js";
2
+ import type { BundledPackage } from "./packages.js";
3
+ declare const dependencyNotices: (settings: DeploySettings, packages: BundledPackage[]) => NoticeSection;
4
+ export { dependencyNotices };
5
+ //# sourceMappingURL=dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../../src/deploy/notices/dependencies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAU,aAAa,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAsCpD,QAAA,MAAM,iBAAiB,GAAI,UAAU,cAAc,EAAE,UAAU,cAAc,EAAE,KAAG,aAUjF,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { warn } from "@gtkx/utils";
2
+ import { BUNDLE_FILENAME } from "../../vite-plugins/esm-extension.js";
3
+ import { isGtkxPackage } from "./gtkx.js";
4
+ const TITLE = "Bundled JavaScript dependencies";
5
+ const UNKNOWN_LICENSE = "unknown";
6
+ const SUMMARY = [
7
+ "Every package listed here is compiled into the application bundle, so its own terms travel with this",
8
+ "package. A dependency that ships a license file has it reproduced in full below; one that only declares",
9
+ "an SPDX identifier is listed with that identifier and with where its source can be obtained.",
10
+ ];
11
+ const subjectFor = (entry) => entry.version === null ? entry.name : `${entry.name} ${entry.version}`;
12
+ const noticeFor = (entry) => ({
13
+ subject: subjectFor(entry),
14
+ license: entry.license ?? UNKNOWN_LICENSE,
15
+ source: entry.source,
16
+ copyright: entry.copyright,
17
+ text: entry.text,
18
+ });
19
+ const warnUndeclared = (entries) => {
20
+ const undeclared = entries.filter((entry) => entry.isPresent && entry.license === null && entry.text === null);
21
+ if (undeclared.length === 0) {
22
+ return;
23
+ }
24
+ warn(`The third-party notices list ${undeclared.map((entry) => subjectFor(entry)).join(", ")} without any ` +
25
+ "license: the package declares no SPDX identifier and ships no license file. Check what the terms are " +
26
+ "before you publish this build, and ask upstream to record them.");
27
+ };
28
+ const dependencyNotices = (settings, packages) => {
29
+ const bundled = packages.filter((entry) => !isGtkxPackage(entry));
30
+ warnUndeclared(bundled);
31
+ return {
32
+ title: TITLE,
33
+ files: [`lib/${settings.binaryName}/${BUNDLE_FILENAME}`],
34
+ summary: SUMMARY,
35
+ notices: bundled.map((entry) => noticeFor(entry)),
36
+ };
37
+ };
38
+ export { dependencyNotices };
39
+ //# sourceMappingURL=dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../../src/deploy/notices/dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGnC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,KAAK,GAAG,iCAAiC,CAAC;AAChD,MAAM,eAAe,GAAG,SAAS,CAAC;AAElC,MAAM,OAAO,GAAG;IACZ,sGAAsG;IACtG,yGAAyG;IACzG,8FAA8F;CACjG,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAqB,EAAU,EAAE,CACjD,KAAK,CAAC,OAAO,KAAK,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Ae,EAAE,CAAC;QACxD,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;KACpD,CAAC;AACN,CAAC,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["import { warn } from \"@gtkx/utils\";\nimport type { DeploySettings, Notice, NoticeSection } from \"../types.js\";\nimport type { BundledPackage } from \"./packages.js\";\nimport { BUNDLE_FILENAME } from \"../../vite-plugins/esm-extension.js\";\nimport { isGtkxPackage } from \"./gtkx.js\";\n\nconst TITLE = \"Bundled JavaScript dependencies\";\nconst UNKNOWN_LICENSE = \"unknown\";\n\nconst SUMMARY = [\n \"Every package listed here is compiled into the application bundle, so its own terms travel with this\",\n \"package. A dependency that ships a license file has it reproduced in full below; one that only declares\",\n \"an SPDX identifier is listed with that identifier and with where its source can be obtained.\",\n];\n\nconst subjectFor = (entry: BundledPackage): string =>\n entry.version === null ? entry.name : `${entry.name} ${entry.version}`;\n\nconst noticeFor = (entry: BundledPackage): Notice => ({\n subject: subjectFor(entry),\n license: entry.license ?? UNKNOWN_LICENSE,\n source: entry.source,\n copyright: entry.copyright,\n text: entry.text,\n});\n\nconst warnUndeclared = (entries: BundledPackage[]): void => {\n const undeclared = entries.filter((entry) => entry.isPresent && entry.license === null && entry.text === null);\n\n if (undeclared.length === 0) {\n return;\n }\n\n warn(\n `The third-party notices list ${undeclared.map((entry) => subjectFor(entry)).join(\", \")} without any ` +\n \"license: the package declares no SPDX identifier and ships no license file. Check what the terms are \" +\n \"before you publish this build, and ask upstream to record them.\",\n );\n};\n\nconst dependencyNotices = (settings: DeploySettings, packages: BundledPackage[]): NoticeSection => {\n const bundled = packages.filter((entry) => !isGtkxPackage(entry));\n warnUndeclared(bundled);\n\n return {\n title: TITLE,\n files: [`lib/${settings.binaryName}/${BUNDLE_FILENAME}`],\n summary: SUMMARY,\n notices: bundled.map((entry) => noticeFor(entry)),\n };\n};\n\nexport { dependencyNotices };\n"]}
@@ -0,0 +1,6 @@
1
+ import type { DeploySettings, NoticeSection } from "../types.js";
2
+ import type { BundledPackage } from "./packages.js";
3
+ declare const isGtkxPackage: (entry: BundledPackage) => boolean;
4
+ declare const gtkxNotices: (settings: DeploySettings, packages: BundledPackage[]) => NoticeSection;
5
+ export { gtkxNotices, isGtkxPackage };
6
+ //# sourceMappingURL=gtkx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gtkx.d.ts","sourceRoot":"","sources":["../../../src/deploy/notices/gtkx.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAU,aAAa,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAapD,QAAA,MAAM,aAAa,GAAI,OAAO,cAAc,KAAG,OAAuC,CAAC;AA0DvF,QAAA,MAAM,WAAW,GAAI,UAAU,cAAc,EAAE,UAAU,cAAc,EAAE,KAAG,aAgB3E,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { sortStrings } from "@gtkx/utils";
2
+ import { BUNDLE_FILENAME } from "../../vite-plugins/esm-extension.js";
3
+ const TITLE = "GTKX";
4
+ const SCOPE = "@gtkx/";
5
+ const LICENSE_NAME = "MPL-2.0";
6
+ const LICENSE_URL = "https://www.mozilla.org/MPL/2.0/";
7
+ const REPOSITORY_URL = "https://github.com/gtkx-org/gtkx";
8
+ const NATIVE_FILENAME = "gtkx.node";
9
+ const CRATES_SUBJECT = "Rust crates linked into the GTKX native addon";
10
+ const CRATES_LICENSE = "MIT and Apache-2.0 and ISC and Unicode-3.0";
11
+ const CRATES_MANIFEST = "packages/native/Cargo.toml";
12
+ const isGtkxPackage = (entry) => entry.name.startsWith(SCOPE);
13
+ const getVersion = (packages) => packages.map((entry) => entry.version).find((version) => version !== null) ?? null;
14
+ const getRepository = (packages) => packages.map((entry) => entry.source).find((source) => source !== null) ?? REPOSITORY_URL;
15
+ const sourceFor = (packages) => {
16
+ const repository = getRepository(packages);
17
+ const version = getVersion(packages);
18
+ return version === null ? repository : `${repository}/tree/v${version}`;
19
+ };
20
+ const cratesSourceFor = (packages) => `${sourceFor(packages)}/${CRATES_MANIFEST}`;
21
+ const modulesLine = (packages) => packages.length === 0 ? [] : [`Modules: ${sortStrings(packages.map((entry) => entry.name)).join(", ")}.`];
22
+ const summaryFor = (settings, packages) => {
23
+ const lib = `lib/${settings.binaryName}`;
24
+ return [
25
+ "GTKX is the framework this application is built on. Its JavaScript is compiled into",
26
+ `${lib}/${BUNDLE_FILENAME}, and its native addon is ${lib}/${NATIVE_FILENAME}.`,
27
+ `The ${LICENSE_NAME} notice below covers the code GTKX wrote, all of which is in both files, and the`,
28
+ `Mozilla Public License 2.0 is published at ${LICENSE_URL}.`,
29
+ "Section 3.2(a) asks that whoever receives an executable form be told how to obtain the source code,",
30
+ "which is what the source pointer below is for: it leads to the release these files were built from.",
31
+ `The addon also statically links Rust crates GTKX did not write, so ${lib}/${NATIVE_FILENAME} is not`,
32
+ `${LICENSE_NAME} alone. The second notice below names the licenses those crates carry; it does not`,
33
+ `reproduce their texts, and ${CRATES_MANIFEST} in the source pointed at records which crates went in`,
34
+ "and at which versions.",
35
+ ...modulesLine(packages),
36
+ ];
37
+ };
38
+ const getText = (packages) => packages.map((entry) => entry.text).find((text) => text !== null) ?? null;
39
+ const getCopyright = (packages) => sortStrings(new Set(packages.flatMap((entry) => entry.copyright)));
40
+ const subjectFor = (packages) => {
41
+ const version = getVersion(packages);
42
+ return version === null ? TITLE : `${TITLE} ${version}`;
43
+ };
44
+ const cratesNotice = (packages) => ({
45
+ subject: CRATES_SUBJECT,
46
+ license: CRATES_LICENSE,
47
+ source: cratesSourceFor(packages),
48
+ copyright: [],
49
+ text: null,
50
+ });
51
+ const gtkxNotices = (settings, packages) => {
52
+ const own = packages.filter((entry) => isGtkxPackage(entry));
53
+ const lib = `lib/${settings.binaryName}`;
54
+ return {
55
+ title: TITLE,
56
+ files: [`${lib}/${NATIVE_FILENAME}`, `${lib}/${BUNDLE_FILENAME}`],
57
+ summary: summaryFor(settings, own),
58
+ notices: [{
59
+ subject: subjectFor(own),
60
+ license: LICENSE_NAME,
61
+ source: sourceFor(own),
62
+ copyright: getCopyright(own),
63
+ text: getText(own),
64
+ }, cratesNotice(own)],
65
+ };
66
+ };
67
+ export { gtkxNotices, isGtkxPackage };
68
+ //# sourceMappingURL=gtkx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gtkx.js","sourceRoot":"","sources":["../../../src/deploy/notices/gtkx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,MAAM,KAAK,GAAG,MAAM,CAAC;AACrB,MAAM,KAAK,GAAG,QAAQ,CAAC;AACvB,MAAM,YAAY,GAAG,SAAS,CAAC;AAC/B,MAAM,WAAW,GAAG,kCAAkC,CAAC;AACvD,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAC1D,MAAM,eAAe,GAAG,WAAW,CAAC;AACpC,MAAM,cAAc,GAAG,+CAA+C,CAAC;AACvE,MAAM,cAAc,GAAG,4CAA4C,CAAC;AACpE,MAAM,eAAe,GAAG,4BAA4B,CAAC;AAErD,MAAM,aAAa,GAAG,CAAC,KAAqB,EAAW,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAEvF,MAAM,UAAU,GAAG,CAAC,QAA0B,EAAiB,EAAE,CAC7D,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,IAAI,CAAC;AAEvF,MAAM,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AAU,EAAE,CAAC;IAEzC,OAAO;QACH,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,CAAC,GAAG,GAAG,IAAI,eAAe,EAAE,EAAE,GAAG,GAAG,IAAI,eAAe,EAAE,CAAC;QACjE,OAAO,EAAE,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC;QAClC,OAAO,EAAE,CAAC;gBACN,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC;gBACxB,OAAO,EAAE,YAAY;gBACrB,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC;gBACtB,SAAS,EAAE,YAAY,CAAC,GAAG,CAAC;gBAC5B,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;aACrB,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;KACxB,CAAC;AACN,CAAC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC","sourcesContent":["import { sortStrings } from \"@gtkx/utils\";\nimport type { DeploySettings, Notice, NoticeSection } from \"../types.js\";\nimport type { BundledPackage } from \"./packages.js\";\nimport { BUNDLE_FILENAME } from \"../../vite-plugins/esm-extension.js\";\n\nconst TITLE = \"GTKX\";\nconst SCOPE = \"@gtkx/\";\nconst LICENSE_NAME = \"MPL-2.0\";\nconst LICENSE_URL = \"https://www.mozilla.org/MPL/2.0/\";\nconst REPOSITORY_URL = \"https://github.com/gtkx-org/gtkx\";\nconst NATIVE_FILENAME = \"gtkx.node\";\nconst CRATES_SUBJECT = \"Rust crates linked into the GTKX native addon\";\nconst CRATES_LICENSE = \"MIT and Apache-2.0 and ISC and Unicode-3.0\";\nconst CRATES_MANIFEST = \"packages/native/Cargo.toml\";\n\nconst isGtkxPackage = (entry: BundledPackage): boolean => entry.name.startsWith(SCOPE);\n\nconst getVersion = (packages: BundledPackage[]): string | null =>\n packages.map((entry) => entry.version).find((version) => version !== null) ?? null;\n\nconst getRepository = (packages: BundledPackage[]): string =>\n packages.map((entry) => entry.source).find((source) => source !== null) ?? REPOSITORY_URL;\n\nconst sourceFor = (packages: BundledPackage[]): string => {\n const repository = getRepository(packages);\n const version = getVersion(packages);\n\n return version === null ? repository : `${repository}/tree/v${version}`;\n};\n\nconst cratesSourceFor = (packages: BundledPackage[]): string => `${sourceFor(packages)}/${CRATES_MANIFEST}`;\n\nconst modulesLine = (packages: BundledPackage[]): string[] =>\n packages.length === 0 ? [] : [`Modules: ${sortStrings(packages.map((entry) => entry.name)).join(\", \")}.`];\n\nconst summaryFor = (settings: DeploySettings, packages: BundledPackage[]): string[] => {\n const lib = `lib/${settings.binaryName}`;\n\n return [\n \"GTKX is the framework this application is built on. Its JavaScript is compiled into\",\n `${lib}/${BUNDLE_FILENAME}, and its native addon is ${lib}/${NATIVE_FILENAME}.`,\n `The ${LICENSE_NAME} notice below covers the code GTKX wrote, all of which is in both files, and the`,\n `Mozilla Public License 2.0 is published at ${LICENSE_URL}.`,\n \"Section 3.2(a) asks that whoever receives an executable form be told how to obtain the source code,\",\n \"which is what the source pointer below is for: it leads to the release these files were built from.\",\n `The addon also statically links Rust crates GTKX did not write, so ${lib}/${NATIVE_FILENAME} is not`,\n `${LICENSE_NAME} alone. The second notice below names the licenses those crates carry; it does not`,\n `reproduce their texts, and ${CRATES_MANIFEST} in the source pointed at records which crates went in`,\n \"and at which versions.\",\n ...modulesLine(packages),\n ];\n};\n\nconst getText = (packages: BundledPackage[]): string | null =>\n packages.map((entry) => entry.text).find((text) => text !== null) ?? null;\n\nconst getCopyright = (packages: BundledPackage[]): string[] =>\n sortStrings(new Set(packages.flatMap((entry) => entry.copyright)));\n\nconst subjectFor = (packages: BundledPackage[]): string => {\n const version = getVersion(packages);\n\n return version === null ? TITLE : `${TITLE} ${version}`;\n};\n\nconst cratesNotice = (packages: BundledPackage[]): Notice => ({\n subject: CRATES_SUBJECT,\n license: CRATES_LICENSE,\n source: cratesSourceFor(packages),\n copyright: [],\n text: null,\n});\n\nconst gtkxNotices = (settings: DeploySettings, packages: BundledPackage[]): NoticeSection => {\n const own = packages.filter((entry) => isGtkxPackage(entry));\n const lib = `lib/${settings.binaryName}`;\n\n return {\n title: TITLE,\n files: [`${lib}/${NATIVE_FILENAME}`, `${lib}/${BUNDLE_FILENAME}`],\n summary: summaryFor(settings, own),\n notices: [{\n subject: subjectFor(own),\n license: LICENSE_NAME,\n source: sourceFor(own),\n copyright: getCopyright(own),\n text: getText(own),\n }, cratesNotice(own)],\n };\n};\n\nexport { gtkxNotices, isGtkxPackage };\n"]}
@@ -0,0 +1,4 @@
1
+ import type { DeploySettings, NoticeSection } from "../types.js";
2
+ declare const libraryNotices: (settings: DeploySettings) => NoticeSection;
3
+ export { libraryNotices };
4
+ //# sourceMappingURL=libraries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libraries.d.ts","sourceRoot":"","sources":["../../../src/deploy/notices/libraries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAU,aAAa,EAAE,MAAM,aAAa,CAAC;AAoEzE,QAAA,MAAM,cAAc,GAAI,UAAU,cAAc,KAAG,aASlD,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { sortStringsBy } from "@gtkx/utils";
2
+ const TITLE = "Platform libraries";
3
+ const GNOME_URL = "https://gitlab.gnome.org/GNOME";
4
+ const LGPL = "LGPL-2.1-or-later";
5
+ const LGPL_URL = "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html";
6
+ const GLIB = {
7
+ subject: "GLib, GObject and GIO",
8
+ license: LGPL,
9
+ source: `${GNOME_URL}/glib`,
10
+ };
11
+ const KNOWN_LIBRARIES = {
12
+ "Adw-1": { subject: "libadwaita", license: LGPL, source: `${GNOME_URL}/libadwaita` },
13
+ "Gtk-4.0": { subject: "GTK", license: LGPL, source: `${GNOME_URL}/gtk` },
14
+ "GtkSource-5": { subject: "GtkSourceView", license: LGPL, source: `${GNOME_URL}/gtksourceview` },
15
+ "WebKit-6.0": {
16
+ subject: "WebKitGTK",
17
+ license: "LGPL-2.1-or-later and BSD-2-Clause",
18
+ source: "https://github.com/WebKit/WebKit",
19
+ },
20
+ };
21
+ const SUMMARY = [
22
+ "Not one of the libraries below is included in this package. GTKX reaches them through GObject",
23
+ "introspection, so they are resolved when the application runs: from the host system for a deb, an rpm",
24
+ "or an AppImage, and from the GNOME runtime for a flatpak. Your platform distributes them to you under",
25
+ "their own terms; this package does not distribute them at all.",
26
+ "The GTKX native addon does link GLib, GObject and GIO dynamically against the copies already installed",
27
+ "on the system, which makes the addon a work that uses those libraries, and section 6 of the LGPL asks",
28
+ "such a work to carry three things. This is the notice it asks for. The license itself is published at",
29
+ `${LGPL_URL},`,
30
+ "and the copyright notice of each library is published with its sources, at the address listed beside",
31
+ "it below. Linking against an installed shared library is the mechanism section 6(b) allows, so the",
32
+ "source of the libraries does not have to travel with this package.",
33
+ ];
34
+ const noticeFor = (library) => ({
35
+ subject: library.subject,
36
+ license: library.license,
37
+ source: library.source,
38
+ copyright: [],
39
+ text: null,
40
+ });
41
+ const knownLibraries = (settings) => settings.libraries.map((library) => KNOWN_LIBRARIES[library]).filter((library) => library !== undefined);
42
+ const otherLibraries = (settings) => settings.libraries.filter((library) => KNOWN_LIBRARIES[library] === undefined);
43
+ const otherSummary = (settings) => {
44
+ const others = otherLibraries(settings);
45
+ if (others.length === 0) {
46
+ return [];
47
+ }
48
+ return [`This application also declares ${others.join(", ")}, resolved from the platform the same way.`];
49
+ };
50
+ const libraryNotices = (settings) => {
51
+ const libraries = sortStringsBy(knownLibraries(settings), (library) => library.subject);
52
+ return {
53
+ title: TITLE,
54
+ files: [],
55
+ summary: [...SUMMARY, ...otherSummary(settings)],
56
+ notices: [GLIB, ...libraries].map((library) => noticeFor(library)),
57
+ };
58
+ };
59
+ export { libraryNotices };
60
+ //# sourceMappingURL=libraries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libraries.js","sourceRoot":"","sources":["../../../src/deploy/notices/libraries.ts"],"names":[],"mappings":"AAAA,OAAO,E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@gtkx/utils\";\nimport type { DeploySettings, Notice, NoticeSection } from \"../types.js\";\n\ntype PlatformLibrary = {\n subject: string;\n license: string;\n source: string;\n};\n\nconst TITLE = \"Platform libraries\";\nconst GNOME_URL = \"https://gitlab.gnome.org/GNOME\";\nconst LGPL = \"LGPL-2.1-or-later\";\nconst LGPL_URL = \"https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html\";\n\nconst GLIB: PlatformLibrary = {\n subject: \"GLib, GObject and GIO\",\n license: LGPL,\n source: `${GNOME_URL}/glib`,\n};\n\nconst KNOWN_LIBRARIES: Record<string, PlatformLibrary> = {\n \"Adw-1\": { subject: \"libadwaita\", license: LGPL, source: `${GNOME_URL}/libadwaita` },\n \"Gtk-4.0\": { subject: \"GTK\", license: LGPL, source: `${GNOME_URL}/gtk` },\n \"GtkSource-5\": { subject: \"GtkSourceView\", license: LGPL, source: `${GNOME_URL}/gtksourceview` },\n \"WebKit-6.0\": {\n subject: \"WebKitGTK\",\n license: \"LGPL-2.1-or-later and BSD-2-Clause\",\n source: \"https://github.com/WebKit/WebKit\",\n },\n};\n\nconst SUMMARY = [\n \"Not one of the libraries below is included in this package. GTKX reaches them through GObject\",\n \"introspection, so they are resolved when the application runs: from the host system for a deb, an rpm\",\n \"or an AppImage, and from the GNOME runtime for a flatpak. Your platform distributes them to you under\",\n \"their own terms; this package does not distribute them at all.\",\n \"The GTKX native addon does link GLib, GObject and GIO dynamically against the copies already installed\",\n \"on the system, which makes the addon a work that uses those libraries, and section 6 of the LGPL asks\",\n \"such a work to carry three things. This is the notice it asks for. The license itself is published at\",\n `${LGPL_URL},`,\n \"and the copyright notice of each library is published with its sources, at the address listed beside\",\n \"it below. Linking against an installed shared library is the mechanism section 6(b) allows, so the\",\n \"source of the libraries does not have to travel with this package.\",\n];\n\nconst noticeFor = (library: PlatformLibrary): Notice => ({\n subject: library.subject,\n license: library.license,\n source: library.source,\n copyright: [],\n text: null,\n});\n\nconst knownLibraries = (settings: DeploySettings): PlatformLibrary[] =>\n settings.libraries.map((library) => KNOWN_LIBRARIES[library]).filter((library) => library !== undefined);\n\nconst otherLibraries = (settings: DeploySettings): string[] =>\n settings.libraries.filter((library) => KNOWN_LIBRARIES[library] === undefined);\n\nconst otherSummary = (settings: DeploySettings): string[] => {\n const others = otherLibraries(settings);\n\n if (others.length === 0) {\n return [];\n }\n\n return [`This application also declares ${others.join(\", \")}, resolved from the platform the same way.`];\n};\n\nconst libraryNotices = (settings: DeploySettings): NoticeSection => {\n const libraries = sortStringsBy(knownLibraries(settings), (library) => library.subject);\n\n return {\n title: TITLE,\n files: [],\n summary: [...SUMMARY, ...otherSummary(settings)],\n notices: [GLIB, ...libraries].map((library) => noticeFor(library)),\n };\n};\n\nexport { libraryNotices };\n"]}
@@ -0,0 +1,4 @@
1
+ import type { DeploySettings, NodeRuntime, NoticeSection } from "../types.js";
2
+ declare const nodeNotices: (settings: DeploySettings, node: NodeRuntime | null) => NoticeSection;
3
+ export { nodeNotices };
4
+ //# sourceMappingURL=node-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-runtime.d.ts","sourceRoot":"","sources":["../../../src/deploy/notices/node-runtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAiF9E,QAAA,MAAM,WAAW,GAAI,UAAU,cAAc,EAAE,MAAM,WAAW,GAAG,IAAI,KAAG,aAgBzE,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { warn } from "@gtkx/utils";
2
+ import { sourcePathFor } from "../node-runtime/index.js";
3
+ import { licenseBesideNode } from "../node-runtime/license.js";
4
+ import { NODE_FILENAME } from "../payload/launcher.js";
5
+ import { nodeLicenseDestination } from "../payload/stage.js";
6
+ import { copyrightLines, readLicenseText } from "./text.js";
7
+ const TITLE = "Node.js runtime";
8
+ const LICENSE_NAME = "Node.js";
9
+ const SOURCE_URL = "https://github.com/nodejs/node";
10
+ const LICENSE_URL = "https://github.com/nodejs/node/blob/main/LICENSE";
11
+ const SUMMARY = [
12
+ "This package carries the Node.js runtime that runs the application. Its license is the one Node.js",
13
+ "publishes as a single document, covering Node.js itself under the MIT terms together with the",
14
+ "components it embeds under theirs, among them V8, OpenSSL, ICU, libuv, zlib, brotli and llhttp.",
15
+ ];
16
+ const CARRIED_SUMMARY = ["The notice below is that document, reproduced from the release this package bundles."];
17
+ const MISSING_SUMMARY = [
18
+ "This run had no copy of that document at hand, so the notice below names it and it is published at",
19
+ `${LICENSE_URL}.`,
20
+ ];
21
+ const MISSING_LICENSE = "Cannot read a license file for the Node.js runtime this deploy bundles. An official release unpacks it " +
22
+ 'next to the binary, so point `deploy.node.path` at one, or use `deploy.node.source: "download"`, and ' +
23
+ "the notices carry it.";
24
+ const isSourceMode = (settings) => settings.deploy.flatpak?.mode === "source";
25
+ const versionFor = (settings, node) => node?.version ?? settings.deploy.node?.version ?? process.versions.node;
26
+ const licenseFileFor = (settings, node) => {
27
+ if (node !== null) {
28
+ return node.licenseFile;
29
+ }
30
+ if ((settings.deploy.node?.source ?? "download") === "download") {
31
+ return null;
32
+ }
33
+ return licenseBesideNode(sourcePathFor(settings));
34
+ };
35
+ const textFor = (settings, node) => {
36
+ const licenseFile = licenseFileFor(settings, node);
37
+ return licenseFile === null ? null : readLicenseText(licenseFile);
38
+ };
39
+ const extensionSummary = (settings) => [
40
+ "The flatpak built from source copies its runtime out of the Node SDK extension in the build sandbox.",
41
+ `That build installs the license file the extension ships as ${nodeLicenseDestination(settings)}, and`,
42
+ "installs nothing when the extension ships none, so read the text at the address above if that file is",
43
+ "not in the package you received.",
44
+ ];
45
+ const carriedSummary = (settings, text) => {
46
+ if (isSourceMode(settings)) {
47
+ return [...MISSING_SUMMARY, ...extensionSummary(settings)];
48
+ }
49
+ return text === null ? MISSING_SUMMARY : CARRIED_SUMMARY;
50
+ };
51
+ const summaryFor = (settings, text) => [
52
+ ...SUMMARY,
53
+ ...carriedSummary(settings, text),
54
+ ];
55
+ const warnMissingLicense = (node, text) => {
56
+ if (node === null || text !== null) {
57
+ return;
58
+ }
59
+ warn(MISSING_LICENSE);
60
+ };
61
+ const nodeNotices = (settings, node) => {
62
+ const text = textFor(settings, node);
63
+ warnMissingLicense(node, text);
64
+ return {
65
+ title: TITLE,
66
+ files: [`lib/${settings.binaryName}/${NODE_FILENAME}`],
67
+ summary: summaryFor(settings, text),
68
+ notices: [{
69
+ subject: `Node.js ${versionFor(settings, node)}`,
70
+ license: LICENSE_NAME,
71
+ source: SOURCE_URL,
72
+ copyright: copyrightLines(text),
73
+ text,
74
+ }],
75
+ };
76
+ };
77
+ export { nodeNotices };
78
+ //# sourceMappingURL=node-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-runtime.js","sourceRoot":"","sources":["../../../src/deploy/notices/node-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5D,MAAM,KAAK,GAAG,iBAAiB,CAAC;AAChC,MAAM,YAAY,GAAG,SAAS,CAAC;AAC/B,MAAM,UAAU,GAAG,gCAAgC,CAAC;AACpD,MAAM,WAAW,GAAG,kDAAkD,CAAC;AAEvE,MAAM,OAAO,GAAG;IACZ,oGAAoG;IACpG,+FAA+F;IAC/F,iGAAiG;CACpG,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,sFAAsF,CAAC,CAAC;AAEjH,MAAM,eAAe,GAAG;IACpB,oGAAoG;IACpG,GAAG,WAAW,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AC","sourcesContent":["import { warn } from \"@gtkx/utils\";\nimport type { DeploySettings, NodeRuntime, NoticeSection } from \"../types.js\";\nimport { sourcePathFor } from \"../node-runtime/index.js\";\nimport { licenseBesideNode } from \"../node-runtime/license.js\";\nimport { NODE_FILENAME } from \"../payload/launcher.js\";\nimport { nodeLicenseDestination } from \"../payload/stage.js\";\nimport { copyrightLines, readLicenseText } from \"./text.js\";\n\nconst TITLE = \"Node.js runtime\";\nconst LICENSE_NAME = \"Node.js\";\nconst SOURCE_URL = \"https://github.com/nodejs/node\";\nconst LICENSE_URL = \"https://github.com/nodejs/node/blob/main/LICENSE\";\n\nconst SUMMARY = [\n \"This package carries the Node.js runtime that runs the application. Its license is the one Node.js\",\n \"publishes as a single document, covering Node.js itself under the MIT terms together with the\",\n \"components it embeds under theirs, among them V8, OpenSSL, ICU, libuv, zlib, brotli and llhttp.\",\n];\n\nconst CARRIED_SUMMARY = [\"The notice below is that document, reproduced from the release this package bundles.\"];\n\nconst MISSING_SUMMARY = [\n \"This run had no copy of that document at hand, so the notice below names it and it is published at\",\n `${LICENSE_URL}.`,\n];\n\nconst MISSING_LICENSE =\n \"Cannot read a license file for the Node.js runtime this deploy bundles. An official release unpacks it \" +\n 'next to the binary, so point `deploy.node.path` at one, or use `deploy.node.source: \"download\"`, and ' +\n \"the notices carry it.\";\n\nconst isSourceMode = (settings: DeploySettings): boolean => settings.deploy.flatpak?.mode === \"source\";\n\nconst versionFor = (settings: DeploySettings, node: NodeRuntime | null): string =>\n node?.version ?? settings.deploy.node?.version ?? process.versions.node;\n\nconst licenseFileFor = (settings: DeploySettings, node: NodeRuntime | null): string | null => {\n if (node !== null) {\n return node.licenseFile;\n }\n\n if ((settings.deploy.node?.source ?? \"download\") === \"download\") {\n return null;\n }\n\n return licenseBesideNode(sourcePathFor(settings));\n};\n\nconst textFor = (settings: DeploySettings, node: NodeRuntime | null): string | null => {\n const licenseFile = licenseFileFor(settings, node);\n\n return licenseFile === null ? null : readLicenseText(licenseFile);\n};\n\nconst extensionSummary = (settings: DeploySettings): string[] => [\n \"The flatpak built from source copies its runtime out of the Node SDK extension in the build sandbox.\",\n `That build installs the license file the extension ships as ${nodeLicenseDestination(settings)}, and`,\n \"installs nothing when the extension ships none, so read the text at the address above if that file is\",\n \"not in the package you received.\",\n];\n\nconst carriedSummary = (settings: DeploySettings, text: string | null): string[] => {\n if (isSourceMode(settings)) {\n return [...MISSING_SUMMARY, ...extensionSummary(settings)];\n }\n\n return text === null ? MISSING_SUMMARY : CARRIED_SUMMARY;\n};\n\nconst summaryFor = (settings: DeploySettings, text: string | null): string[] => [\n ...SUMMARY,\n ...carriedSummary(settings, text),\n];\n\nconst warnMissingLicense = (node: NodeRuntime | null, text: string | null): void => {\n if (node === null || text !== null) {\n return;\n }\n\n warn(MISSING_LICENSE);\n};\n\nconst nodeNotices = (settings: DeploySettings, node: NodeRuntime | null): NoticeSection => {\n const text = textFor(settings, node);\n warnMissingLicense(node, text);\n\n return {\n title: TITLE,\n files: [`lib/${settings.binaryName}/${NODE_FILENAME}`],\n summary: summaryFor(settings, text),\n notices: [{\n subject: `Node.js ${versionFor(settings, node)}`,\n license: LICENSE_NAME,\n source: SOURCE_URL,\n copyright: copyrightLines(text),\n text,\n }],\n };\n};\n\nexport { nodeNotices };\n"]}
@@ -0,0 +1,13 @@
1
+ import type { DeploySettings } from "../types.js";
2
+ type BundledPackage = {
3
+ name: string;
4
+ version: string | null;
5
+ license: string | null;
6
+ source: string | null;
7
+ copyright: string[];
8
+ text: string | null;
9
+ isPresent: boolean;
10
+ };
11
+ declare const bundledPackages: (settings: DeploySettings) => BundledPackage[];
12
+ export { type BundledPackage, bundledPackages };
13
+ //# sourceMappingURL=packages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packages.d.ts","sourceRoot":"","sources":["../../../src/deploy/notices/packages.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAWlD,KAAK,cAAc,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACtB,CAAC;AAmIF,QAAA,MAAM,eAAe,GAAI,UAAU,cAAc,KAAG,cAAc,EAYjE,CAAC;AAEF,OAAO,EAAE,KAAK,cAAc,EAAE,eAAe,EAAE,CAAC"}