@platforma-sdk/package-builder-lib 1.4.1 → 1.4.3

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 (77) hide show
  1. package/assets/conda-dockerfile.template +1 -0
  2. package/dist/_virtual/_rolldown/runtime.cjs +2 -3
  3. package/dist/_virtual/_rolldown/runtime.js +1 -2
  4. package/dist/core/archive.cjs +1 -2
  5. package/dist/core/archive.cjs.map +1 -1
  6. package/dist/core/archive.js +1 -2
  7. package/dist/core/conda/builder.cjs +1 -2
  8. package/dist/core/conda/builder.cjs.map +1 -1
  9. package/dist/core/conda/builder.js +1 -2
  10. package/dist/core/conda/builder.js.map +1 -1
  11. package/dist/core/conda/validate-spec.cjs +1 -2
  12. package/dist/core/conda/validate-spec.js +1 -2
  13. package/dist/core/core.cjs +11 -12
  14. package/dist/core/core.cjs.map +1 -1
  15. package/dist/core/core.d.ts +3 -5
  16. package/dist/core/core.d.ts.map +1 -1
  17. package/dist/core/core.js +13 -13
  18. package/dist/core/core.js.map +1 -1
  19. package/dist/core/docker-conda.cjs +1 -2
  20. package/dist/core/docker-conda.js +1 -2
  21. package/dist/core/docker-coverage.cjs +1 -2
  22. package/dist/core/docker-coverage.d.ts +1 -3
  23. package/dist/core/docker-coverage.d.ts.map +1 -1
  24. package/dist/core/docker-coverage.js +3 -3
  25. package/dist/core/docker-coverage.js.map +1 -1
  26. package/dist/core/docker-python.cjs +1 -2
  27. package/dist/core/docker-python.js +1 -2
  28. package/dist/core/docker.cjs +1 -2
  29. package/dist/core/docker.cjs.map +1 -1
  30. package/dist/core/docker.js +1 -2
  31. package/dist/core/envs.cjs +1 -2
  32. package/dist/core/envs.d.ts +0 -1
  33. package/dist/core/envs.js +1 -2
  34. package/dist/core/package-info.cjs +13 -12
  35. package/dist/core/package-info.cjs.map +1 -1
  36. package/dist/core/package-info.d.ts +4 -5
  37. package/dist/core/package-info.d.ts.map +1 -1
  38. package/dist/core/package-info.js +13 -12
  39. package/dist/core/package-info.js.map +1 -1
  40. package/dist/core/paths.cjs +1 -2
  41. package/dist/core/paths.cjs.map +1 -1
  42. package/dist/core/paths.js +1 -2
  43. package/dist/core/paths.js.map +1 -1
  44. package/dist/core/push-guard.cjs +1 -2
  45. package/dist/core/push-guard.cjs.map +1 -1
  46. package/dist/core/push-guard.d.ts +0 -2
  47. package/dist/core/push-guard.d.ts.map +1 -1
  48. package/dist/core/push-guard.js +1 -2
  49. package/dist/core/resolver.cjs +1 -2
  50. package/dist/core/resolver.js +1 -2
  51. package/dist/core/schemas/artifacts.cjs +1 -2
  52. package/dist/core/schemas/artifacts.d.ts +1 -169
  53. package/dist/core/schemas/artifacts.d.ts.map +1 -1
  54. package/dist/core/schemas/artifacts.js +1 -2
  55. package/dist/core/schemas/entrypoints.cjs +1 -2
  56. package/dist/core/schemas/entrypoints.d.ts +1 -352
  57. package/dist/core/schemas/entrypoints.d.ts.map +1 -1
  58. package/dist/core/schemas/entrypoints.js +1 -2
  59. package/dist/core/schemas/sw-json.cjs +1 -2
  60. package/dist/core/schemas/sw-json.js +1 -2
  61. package/dist/core/storage.cjs +1 -2
  62. package/dist/core/storage.js +1 -2
  63. package/dist/core/sw-json-render.cjs +1 -2
  64. package/dist/core/sw-json-render.js +1 -2
  65. package/dist/core/util.cjs +1 -2
  66. package/dist/core/util.cjs.map +1 -1
  67. package/dist/core/util.d.ts +0 -1
  68. package/dist/core/util.js +1 -2
  69. package/dist/defaults.cjs +1 -2
  70. package/dist/defaults.d.ts +0 -1
  71. package/dist/defaults.js +1 -2
  72. package/dist/index.cjs +1 -2
  73. package/dist/index.d.ts +0 -2
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +1 -2
  76. package/package.json +20 -15
  77. package/src/core/conda/builder.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"util.cjs","names":["fs","path","os"],"sources":["../../src/core/util.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport * as os from \"node:os\";\nimport fs from \"node:fs\";\nimport type { Hash } from \"node:crypto\";\nimport { createHash } from \"node:crypto\";\nimport winston from \"winston\";\nimport type { z } from \"zod/v4\";\nimport * as envs from \"./envs\";\n\nexport const packageJsonName = \"package.json\";\nexport const softwareConfigName = \"package.json\";\n\nexport function assertNever(_a: never): never {\n throw new Error(`code logic error: assertNever() call for ${JSON.stringify(_a)}`);\n}\n\nexport function trimPrefix(str: string, prefix: string): string {\n if (str.startsWith(prefix)) {\n return str.slice(prefix.length);\n }\n return str;\n}\n\nexport function trimSuffix(str: string, suffix: string): string {\n if (str.endsWith(suffix)) {\n return str.slice(0, -suffix.length);\n }\n return str;\n}\n\nexport function hashDirMetaSync(folder: string, hasher?: Hash): Hash {\n const hash = hasher ? hasher : createHash(\"sha256\");\n const info = fs.readdirSync(folder, { withFileTypes: true });\n\n for (const item of info) {\n const fullPath = path.join(folder, item.name);\n\n if (item.isFile()) {\n const statInfo = fs.statSync(fullPath);\n const fileInfo = `${fullPath}:${statInfo.size}:${statInfo.mtimeMs}`;\n hash.update(fileInfo);\n } else if (item.isDirectory()) {\n hashDirMetaSync(fullPath, hash);\n }\n }\n\n return hash;\n}\n\nexport function hashDirSync(rootDir: string, hasher?: Hash, subdir?: string): Hash {\n const hash = hasher ? hasher : createHash(\"sha256\");\n const folder = path.join(rootDir, subdir ?? \".\");\n\n // Sort for a host-independent hash: readdir enumeration order is not guaranteed.\n const info = fs\n .readdirSync(folder, { withFileTypes: true })\n .sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));\n\n for (const item of info) {\n const relPath = path.join(subdir ?? \".\", item.name);\n const fullPath = path.join(folder, item.name);\n\n hash.update(relPath);\n\n if (item.isFile()) {\n const fileDescriptor = fs.openSync(fullPath, \"r\");\n const buffer = Buffer.alloc(65536);\n let bytesRead: number;\n\n while ((bytesRead = fs.readSync(fileDescriptor, buffer, 0, buffer.length, null)) !== 0) {\n hash.update(buffer.subarray(0, bytesRead));\n }\n\n fs.closeSync(fileDescriptor);\n } else if (item.isDirectory()) {\n // Keep rootDir fixed and pass the accumulated relPath so nested entries hash under their\n // full path from the root — otherwise `dirA/` + `file` collides with `dirA/file`.\n hashDirSync(rootDir, hash, relPath);\n }\n }\n\n return hash;\n}\n\n//\n// Creates all intermediate directories down to given <dirPath>.\n//\nexport function ensureDirsExist(dirPath: string) {\n if (fs.existsSync(dirPath)) {\n return;\n }\n const parentDir = path.dirname(dirPath);\n ensureDirsExist(parentDir);\n fs.mkdirSync(dirPath);\n}\n\nexport function findPackageRoot(logger: winston.Logger, startPath?: string): string {\n if (!startPath) {\n startPath = process.cwd();\n }\n logger.debug(`Detecting package root...`);\n const pkgRoot = searchPathUp(startPath, startPath, packageJsonName);\n logger.debug(` package root found at '${pkgRoot}'`);\n\n return pkgRoot;\n}\n\nexport function findNodeModules(logger: winston.Logger, startPath?: string): string {\n if (!startPath) {\n startPath = process.cwd();\n }\n logger.debug(`Detecting 'node_modules' directory...`);\n const nodeModules = searchPathUp(startPath, startPath, \"node_modules\");\n logger.debug(` 'node_modules' found at '${nodeModules}'`);\n\n return path.join(nodeModules, \"node_modules\");\n}\n\nexport function findInstalledModule(\n logger: winston.Logger,\n packageName: string,\n startPath?: string,\n): string {\n const nodeModules = findNodeModules(logger, startPath);\n const packagePath = path.resolve(nodeModules, packageName);\n\n if (!fs.existsSync(packagePath)) {\n throw CLIError(\n `package '${packageName}' not found in '${nodeModules}'. Did you forget to add it as a dependency?`,\n );\n }\n\n return packagePath;\n}\n\nfunction searchPathUp(startPath: string, pathToCheck: string, itemToCheck: string): string {\n const itemPath = path.resolve(pathToCheck, itemToCheck);\n\n if (fs.existsSync(itemPath)) {\n return pathToCheck;\n }\n\n const parentDir = path.dirname(pathToCheck);\n if (parentDir === pathToCheck || pathToCheck === \"\") {\n throw CLIError(\n `failed to find '${itemToCheck}' file in any of parent directories starting from '${startPath}'`,\n );\n }\n\n return searchPathUp(startPath, parentDir, itemToCheck);\n}\n\nexport function createLogger(level: string = \"debug\"): winston.Logger {\n if (envs.isCI() && envs.isRunnerDebug()) {\n level = \"debug\";\n }\n\n return winston.createLogger({\n level: level,\n\n format: winston.format.printf(({ level, message }) => {\n const indent = \" \".repeat(level.length + 2); // For ': ' after the level\n if (typeof message !== \"string\") {\n const messageJson = JSON.stringify(message);\n throw new Error(`logger message ${messageJson} is not a string`);\n }\n const indentedMessage = message\n .split(\"\\n\")\n .map((line: string, index: number) => (index === 0 ? line : indent + line))\n .join(\"\\n\");\n\n const colorize = (l: string) => winston.format.colorize().colorize(l, l);\n\n return `${colorize(level)}: ${indentedMessage}`;\n }),\n\n transports: [\n new winston.transports.Console({\n stderrLevels: [\"error\", \"warn\", \"info\", \"debug\"],\n handleExceptions: true,\n }),\n ],\n });\n}\n\nexport function rSplit(input: string, delimiter: string, limit?: number): string[] {\n const parts = input.split(delimiter);\n if (!limit || parts.length <= limit) {\n return parts;\n }\n\n return [parts.slice(0, -limit + 1).join(delimiter), ...parts.slice(-limit + 1)];\n}\n\nconst replaceDuplicateSlashes = new RegExp(\"//+\", \"g\");\nexport function urlJoin(url: string, appendPath: string): string {\n const u = new URL(url, \"file:/nonexistent-9672674c/\");\n if (u.protocol === \"file:\" && u.pathname.startsWith(\"/nonexistent-9672674c/\")) {\n throw new Error(`string '${url}' is not valid URL`);\n }\n\n u.pathname = u.pathname + \"/\" + appendPath;\n u.pathname = u.pathname.replaceAll(replaceDuplicateSlashes, \"/\");\n return u.toString();\n}\n\nexport function wrapErr(e: any, msg: string): any {\n if (!(e instanceof Error)) {\n return e;\n }\n\n const wrappedError = new Error(`${msg}: ${e.message}`);\n wrappedError.name = e.name;\n wrappedError.stack = e.stack;\n // Copy any additional custom properties\n Object.assign(wrappedError, e);\n return wrappedError;\n}\n\n/**\n * Converts any value to integer number 1 if value is truthful and 0 otherwice.\n * Provides simple way to count values that are defined in an object:\n * toInt(options.a) + toInt(options.b) + toInt(options.c) === 1\n * @param input: any\n * @returns number - '1' or '0'\n */\nexport function toInt(input: any): number {\n return input ? 1 : 0;\n}\n\nexport const OSes = [\"linux\", \"macosx\", \"windows\"] as const;\nexport type OSType = (typeof OSes)[number];\n\nexport function currentOS(): OSType {\n const platform = os.platform();\n switch (platform) {\n case \"darwin\":\n return \"macosx\";\n case \"linux\":\n return \"linux\";\n case \"win32\":\n return \"windows\";\n default:\n throw CLIError(\n `operating system '${platform}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` +\n JSON.stringify(OSes),\n );\n }\n}\n\nexport const Arches = [\"x64\", \"aarch64\"] as const;\nexport type ArchType = (typeof Arches)[number];\n\nexport function currentArch(): ArchType {\n const arch = os.arch();\n switch (arch) {\n case \"arm64\":\n return \"aarch64\";\n case \"x64\":\n return \"x64\";\n default:\n throw CLIError(\n `processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` +\n JSON.stringify(Arches),\n );\n }\n}\n\n// Combinartions of OS and architecture, Platforma supports.\nexport const AllPlatforms: `${OSType}-${ArchType}`[] = [\n \"linux-x64\",\n \"linux-aarch64\",\n \"macosx-x64\",\n \"macosx-aarch64\",\n \"windows-x64\",\n] as const;\nexport type PlatformType = (typeof AllPlatforms)[number];\n\nexport function splitPlatform(platform: PlatformType): { os: OSType; arch: ArchType } {\n const parts = platform.split(\"-\");\n\n return {\n os: parts[0] as OSType,\n arch: parts[1] as ArchType,\n };\n}\n\nexport function joinPlatform(os: OSType, arch: ArchType): PlatformType {\n return `${os}-${arch}`;\n}\n\nexport function isPlatformSupported(os: OSType, arch: ArchType): boolean {\n return AllPlatforms.includes(`${os}-${arch}`);\n}\n\nexport function currentPlatform(): PlatformType {\n return `${currentOS()}-${currentArch()}`;\n}\n\nexport const AllSoftwareSources = [\"archive\", \"docker\"] as const; // add 'image', '<whatever>' here when supported\nexport type SoftwareSource = (typeof AllSoftwareSources)[number];\n\nexport type BuildMode = \"dev-local\" | \"dev-remote\" | \"release\";\n\nexport function isDevMode(mode: BuildMode): mode is \"dev-local\" | \"dev-remote\" {\n return mode === \"dev-local\" || mode === \"dev-remote\";\n}\n\nexport function producesRegistryDescriptor(mode: BuildMode): mode is \"dev-remote\" | \"release\" {\n return mode === \"dev-remote\" || mode === \"release\";\n}\n\n// Resolve a `--do`/`--no-do` (or PL_*_/PL_*_NO_ env) tri-state: explicit disable wins, then enable,\n// else the default.\nexport function shouldDoAction(opts: {\n default: boolean;\n enable?: boolean;\n disable?: boolean;\n}): boolean {\n if (opts.disable) return false;\n if (opts.enable) return true;\n return opts.default;\n}\n\nexport type artifactID = {\n package: string;\n name: string;\n};\n\nexport function artifactIDFromString(s: string): artifactID {\n const parts = s.split(\":\", 2);\n if (parts.length < 2) {\n throw CLIError(\n `string '${s}' is not an artifact ID (artifact ID format is <packageName>:<artifactName>)`,\n );\n }\n return {\n package: parts[0],\n name: parts[1],\n };\n}\n\nexport function artifactIDToString(a: artifactID): string {\n return `${a.package}:${a.name}`;\n}\n\nexport function indentText(txt: string, indent: string | number, skipFirstLine: boolean = false) {\n indent = typeof indent === \"number\" ? \" \".repeat(indent) : indent;\n\n return txt\n .split(\"\\n\")\n .map((line, index) => (index === 0 && skipFirstLine ? line : `${indent}${line}`))\n .join(\"\\n\");\n}\n\nexport const formatZodIssues = (\n issues: z.core.$ZodIssue[],\n i: string = \"\",\n p: PropertyKey[] = [],\n): string => {\n const _errors: string[] = [];\n\n const formatSubpath = (path: PropertyKey[], prefix: string = \"\") => {\n let pp = path.join(\".\");\n if (pp != \"\" && p.length > 0) pp = `.${pp}`;\n if (pp != \"\") pp = `${prefix}${pp}`;\n return pp;\n };\n\n const addItem = (item: string) => _errors.push(indentText(item, i));\n\n for (const issue of issues) {\n if (issue.code === \"invalid_union\") {\n addItem(`✖ Expected one of several possible values`);\n const path = formatSubpath(issue.path, \"\");\n addItem(` → at '${path}':`);\n for (const errGrp of issue.errors) {\n _errors.push(formatZodIssues(errGrp, `${i} `, [...p, ...issue.path]));\n }\n } else if (issue.code === \"invalid_element\" || issue.code === \"invalid_key\") {\n addItem(`✖ ${issue.code.replaceAll(\"_\", \" \")}:`);\n _errors.push(formatZodIssues(issue.issues, `${i} `, [...p, ...issue.path]));\n } else if (issue.code === \"invalid_type\") {\n const path = formatSubpath(issue.path, \" \");\n const prefix = `✖ (${issue.expected})${path}: `;\n const msg = indentText(issue.message, Math.min(prefix.length, 20), true);\n addItem(`${prefix}${msg}`);\n } else {\n const path = formatSubpath(issue.path, \" \");\n const prefix = `✖ (${issue.code.replaceAll(\"_\", \" \")})${path}: `;\n const msg = indentText(issue.message, Math.min(prefix.length, 20), true);\n addItem(`${prefix}${msg}`);\n }\n }\n\n return _errors.join(\"\\n\");\n};\n\n// User-facing CLI error. The top-level handler (bin/run.mjs) prints its\n// message without a stack trace and exits non-zero.\nexport class CLIErrorClass extends Error {\n constructor(msg: string | Error) {\n super(typeof msg === \"string\" ? msg : msg.message);\n this.name = \"CLIError\";\n }\n}\n\nexport function CLIError(msg: string | Error): CLIErrorClass {\n return new CLIErrorClass(msg);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAa,kBAAkB;AAC/B,MAAa,qBAAqB;AAElC,SAAgB,YAAY,IAAkB;CAC5C,MAAM,IAAI,MAAM,4CAA4C,KAAK,UAAU,EAAE,GAAG;AAClF;AAEA,SAAgB,WAAW,KAAa,QAAwB;CAC9D,IAAI,IAAI,WAAW,MAAM,GACvB,OAAO,IAAI,MAAM,OAAO,MAAM;CAEhC,OAAO;AACT;AAEA,SAAgB,WAAW,KAAa,QAAwB;CAC9D,IAAI,IAAI,SAAS,MAAM,GACrB,OAAO,IAAI,MAAM,GAAG,CAAC,OAAO,MAAM;CAEpC,OAAO;AACT;AAEA,SAAgB,gBAAgB,QAAgB,QAAqB;CACnE,MAAM,OAAO,SAAS,UAAA,GAAA,YAAA,WAAA,CAAoB,QAAQ;CAClD,MAAM,OAAOA,QAAAA,QAAG,YAAY,QAAQ,EAAE,eAAe,KAAK,CAAC;CAE3D,KAAK,MAAM,QAAQ,MAAM;E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EAAE,OAAO,CAAC,GAAG,GAAG,GAAG,MAAM,IAAI,CAAC,CAAC;CAE3E,OAAO,IAAI,MAAM,SAAS,qBAAqB,MAAM,SAAS,eAAe;EAC3E,QAAQ,KAAK,MAAM,KAAK,WAAW,KAAK,GAAG,EAAE,EAAE;EAC/C,QAAQ,KAAK,gBAAgB,MAAM,QAAQ,GAAG,EAAE,KAAK,CAAC,GAAG,GAAG,GAAG,MAAM,IAAI,CAAC,CAAC;CAC7E,OAAO,IAAI,MAAM,SAAS,gBAAgB;EACxC,MAAM,OAAO,cAAc,MAAM,MAAM,GAAG;EAC1C,MAAM,SAAS,MAAM,MAAM,SAAS,GAAG,KAAK;EAE5C,QAAQ,GAAG,SADC,WAAW,MAAM,SAAS,KAAK,IAAI,OAAO,QAAQ,EAAE,GAAG,IAC7C,GAAG;CAC3B,OAAO;EACL,MAAM,OAAO,cAAc,MAAM,MAAM,GAAG;EAC1C,MAAM,SAAS,MAAM,MAAM,KAAK,WAAW,KAAK,GAAG,EAAE,GAAG,KAAK;EAE7D,QAAQ,GAAG,SADC,WAAW,MAAM,SAAS,KAAK,IAAI,OAAO,QAAQ,EAAE,GAAG,IAC7C,GAAG;CAC3B;CAGF,OAAO,QAAQ,KAAK,IAAI;AAC1B;AAIA,IAAa,gBAAb,cAAmC,MAAM;CACvC,YAAY,KAAqB;EAC/B,MAAM,OAAO,QAAQ,WAAW,MAAM,IAAI,OAAO;EACjD,KAAK,OAAO;CACd;AACF;AAEA,SAAgB,SAAS,KAAoC;CAC3D,OAAO,IAAI,cAAc,GAAG;AAC9B"}
1
+ {"version":3,"file":"util.cjs","names":["createHash","fs","path","os"],"sources":["../../src/core/util.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport * as os from \"node:os\";\nimport fs from \"node:fs\";\nimport type { Hash } from \"node:crypto\";\nimport { createHash } from \"node:crypto\";\nimport winston from \"winston\";\nimport type { z } from \"zod/v4\";\nimport * as envs from \"./envs\";\n\nexport const packageJsonName = \"package.json\";\nexport const softwareConfigName = \"package.json\";\n\nexport function assertNever(_a: never): never {\n throw new Error(`code logic error: assertNever() call for ${JSON.stringify(_a)}`);\n}\n\nexport function trimPrefix(str: string, prefix: string): string {\n if (str.startsWith(prefix)) {\n return str.slice(prefix.length);\n }\n return str;\n}\n\nexport function trimSuffix(str: string, suffix: string): string {\n if (str.endsWith(suffix)) {\n return str.slice(0, -suffix.length);\n }\n return str;\n}\n\nexport function hashDirMetaSync(folder: string, hasher?: Hash): Hash {\n const hash = hasher ? hasher : createHash(\"sha256\");\n const info = fs.readdirSync(folder, { withFileTypes: true });\n\n for (const item of info) {\n const fullPath = path.join(folder, item.name);\n\n if (item.isFile()) {\n const statInfo = fs.statSync(fullPath);\n const fileInfo = `${fullPath}:${statInfo.size}:${statInfo.mtimeMs}`;\n hash.update(fileInfo);\n } else if (item.isDirectory()) {\n hashDirMetaSync(fullPath, hash);\n }\n }\n\n return hash;\n}\n\nexport function hashDirSync(rootDir: string, hasher?: Hash, subdir?: string): Hash {\n const hash = hasher ? hasher : createHash(\"sha256\");\n const folder = path.join(rootDir, subdir ?? \".\");\n\n // Sort for a host-independent hash: readdir enumeration order is not guaranteed.\n const info = fs\n .readdirSync(folder, { withFileTypes: true })\n .sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));\n\n for (const item of info) {\n const relPath = path.join(subdir ?? \".\", item.name);\n const fullPath = path.join(folder, item.name);\n\n hash.update(relPath);\n\n if (item.isFile()) {\n const fileDescriptor = fs.openSync(fullPath, \"r\");\n const buffer = Buffer.alloc(65536);\n let bytesRead: number;\n\n while ((bytesRead = fs.readSync(fileDescriptor, buffer, 0, buffer.length, null)) !== 0) {\n hash.update(buffer.subarray(0, bytesRead));\n }\n\n fs.closeSync(fileDescriptor);\n } else if (item.isDirectory()) {\n // Keep rootDir fixed and pass the accumulated relPath so nested entries hash under their\n // full path from the root — otherwise `dirA/` + `file` collides with `dirA/file`.\n hashDirSync(rootDir, hash, relPath);\n }\n }\n\n return hash;\n}\n\n//\n// Creates all intermediate directories down to given <dirPath>.\n//\nexport function ensureDirsExist(dirPath: string) {\n if (fs.existsSync(dirPath)) {\n return;\n }\n const parentDir = path.dirname(dirPath);\n ensureDirsExist(parentDir);\n fs.mkdirSync(dirPath);\n}\n\nexport function findPackageRoot(logger: winston.Logger, startPath?: string): string {\n if (!startPath) {\n startPath = process.cwd();\n }\n logger.debug(`Detecting package root...`);\n const pkgRoot = searchPathUp(startPath, startPath, packageJsonName);\n logger.debug(` package root found at '${pkgRoot}'`);\n\n return pkgRoot;\n}\n\nexport function findNodeModules(logger: winston.Logger, startPath?: string): string {\n if (!startPath) {\n startPath = process.cwd();\n }\n logger.debug(`Detecting 'node_modules' directory...`);\n const nodeModules = searchPathUp(startPath, startPath, \"node_modules\");\n logger.debug(` 'node_modules' found at '${nodeModules}'`);\n\n return path.join(nodeModules, \"node_modules\");\n}\n\nexport function findInstalledModule(\n logger: winston.Logger,\n packageName: string,\n startPath?: string,\n): string {\n const nodeModules = findNodeModules(logger, startPath);\n const packagePath = path.resolve(nodeModules, packageName);\n\n if (!fs.existsSync(packagePath)) {\n throw CLIError(\n `package '${packageName}' not found in '${nodeModules}'. Did you forget to add it as a dependency?`,\n );\n }\n\n return packagePath;\n}\n\nfunction searchPathUp(startPath: string, pathToCheck: string, itemToCheck: string): string {\n const itemPath = path.resolve(pathToCheck, itemToCheck);\n\n if (fs.existsSync(itemPath)) {\n return pathToCheck;\n }\n\n const parentDir = path.dirname(pathToCheck);\n if (parentDir === pathToCheck || pathToCheck === \"\") {\n throw CLIError(\n `failed to find '${itemToCheck}' file in any of parent directories starting from '${startPath}'`,\n );\n }\n\n return searchPathUp(startPath, parentDir, itemToCheck);\n}\n\nexport function createLogger(level: string = \"debug\"): winston.Logger {\n if (envs.isCI() && envs.isRunnerDebug()) {\n level = \"debug\";\n }\n\n return winston.createLogger({\n level: level,\n\n format: winston.format.printf(({ level, message }) => {\n const indent = \" \".repeat(level.length + 2); // For ': ' after the level\n if (typeof message !== \"string\") {\n const messageJson = JSON.stringify(message);\n throw new Error(`logger message ${messageJson} is not a string`);\n }\n const indentedMessage = message\n .split(\"\\n\")\n .map((line: string, index: number) => (index === 0 ? line : indent + line))\n .join(\"\\n\");\n\n const colorize = (l: string) => winston.format.colorize().colorize(l, l);\n\n return `${colorize(level)}: ${indentedMessage}`;\n }),\n\n transports: [\n new winston.transports.Console({\n stderrLevels: [\"error\", \"warn\", \"info\", \"debug\"],\n handleExceptions: true,\n }),\n ],\n });\n}\n\nexport function rSplit(input: string, delimiter: string, limit?: number): string[] {\n const parts = input.split(delimiter);\n if (!limit || parts.length <= limit) {\n return parts;\n }\n\n return [parts.slice(0, -limit + 1).join(delimiter), ...parts.slice(-limit + 1)];\n}\n\nconst replaceDuplicateSlashes = new RegExp(\"//+\", \"g\");\nexport function urlJoin(url: string, appendPath: string): string {\n const u = new URL(url, \"file:/nonexistent-9672674c/\");\n if (u.protocol === \"file:\" && u.pathname.startsWith(\"/nonexistent-9672674c/\")) {\n throw new Error(`string '${url}' is not valid URL`);\n }\n\n u.pathname = u.pathname + \"/\" + appendPath;\n u.pathname = u.pathname.replaceAll(replaceDuplicateSlashes, \"/\");\n return u.toString();\n}\n\nexport function wrapErr(e: any, msg: string): any {\n if (!(e instanceof Error)) {\n return e;\n }\n\n const wrappedError = new Error(`${msg}: ${e.message}`);\n wrappedError.name = e.name;\n wrappedError.stack = e.stack;\n // Copy any additional custom properties\n Object.assign(wrappedError, e);\n return wrappedError;\n}\n\n/**\n * Converts any value to integer number 1 if value is truthful and 0 otherwice.\n * Provides simple way to count values that are defined in an object:\n * toInt(options.a) + toInt(options.b) + toInt(options.c) === 1\n * @param input: any\n * @returns number - '1' or '0'\n */\nexport function toInt(input: any): number {\n return input ? 1 : 0;\n}\n\nexport const OSes = [\"linux\", \"macosx\", \"windows\"] as const;\nexport type OSType = (typeof OSes)[number];\n\nexport function currentOS(): OSType {\n const platform = os.platform();\n switch (platform) {\n case \"darwin\":\n return \"macosx\";\n case \"linux\":\n return \"linux\";\n case \"win32\":\n return \"windows\";\n default:\n throw CLIError(\n `operating system '${platform}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` +\n JSON.stringify(OSes),\n );\n }\n}\n\nexport const Arches = [\"x64\", \"aarch64\"] as const;\nexport type ArchType = (typeof Arches)[number];\n\nexport function currentArch(): ArchType {\n const arch = os.arch();\n switch (arch) {\n case \"arm64\":\n return \"aarch64\";\n case \"x64\":\n return \"x64\";\n default:\n throw CLIError(\n `processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` +\n JSON.stringify(Arches),\n );\n }\n}\n\n// Combinartions of OS and architecture, Platforma supports.\nexport const AllPlatforms: `${OSType}-${ArchType}`[] = [\n \"linux-x64\",\n \"linux-aarch64\",\n \"macosx-x64\",\n \"macosx-aarch64\",\n \"windows-x64\",\n] as const;\nexport type PlatformType = (typeof AllPlatforms)[number];\n\nexport function splitPlatform(platform: PlatformType): { os: OSType; arch: ArchType } {\n const parts = platform.split(\"-\");\n\n return {\n os: parts[0] as OSType,\n arch: parts[1] as ArchType,\n };\n}\n\nexport function joinPlatform(os: OSType, arch: ArchType): PlatformType {\n return `${os}-${arch}`;\n}\n\nexport function isPlatformSupported(os: OSType, arch: ArchType): boolean {\n return AllPlatforms.includes(`${os}-${arch}`);\n}\n\nexport function currentPlatform(): PlatformType {\n return `${currentOS()}-${currentArch()}`;\n}\n\nexport const AllSoftwareSources = [\"archive\", \"docker\"] as const; // add 'image', '<whatever>' here when supported\nexport type SoftwareSource = (typeof AllSoftwareSources)[number];\n\nexport type BuildMode = \"dev-local\" | \"dev-remote\" | \"release\";\n\nexport function isDevMode(mode: BuildMode): mode is \"dev-local\" | \"dev-remote\" {\n return mode === \"dev-local\" || mode === \"dev-remote\";\n}\n\nexport function producesRegistryDescriptor(mode: BuildMode): mode is \"dev-remote\" | \"release\" {\n return mode === \"dev-remote\" || mode === \"release\";\n}\n\n// Resolve a `--do`/`--no-do` (or PL_*_/PL_*_NO_ env) tri-state: explicit disable wins, then enable,\n// else the default.\nexport function shouldDoAction(opts: {\n default: boolean;\n enable?: boolean;\n disable?: boolean;\n}): boolean {\n if (opts.disable) return false;\n if (opts.enable) return true;\n return opts.default;\n}\n\nexport type artifactID = {\n package: string;\n name: string;\n};\n\nexport function artifactIDFromString(s: string): artifactID {\n const parts = s.split(\":\", 2);\n if (parts.length < 2) {\n throw CLIError(\n `string '${s}' is not an artifact ID (artifact ID format is <packageName>:<artifactName>)`,\n );\n }\n return {\n package: parts[0],\n name: parts[1],\n };\n}\n\nexport function artifactIDToString(a: artifactID): string {\n return `${a.package}:${a.name}`;\n}\n\nexport function indentText(txt: string, indent: string | number, skipFirstLine: boolean = false) {\n indent = typeof indent === \"number\" ? \" \".repeat(indent) : indent;\n\n return txt\n .split(\"\\n\")\n .map((line, index) => (index === 0 && skipFirstLine ? line : `${indent}${line}`))\n .join(\"\\n\");\n}\n\nexport const formatZodIssues = (\n issues: z.core.$ZodIssue[],\n i: string = \"\",\n p: PropertyKey[] = [],\n): string => {\n const _errors: string[] = [];\n\n const formatSubpath = (path: PropertyKey[], prefix: string = \"\") => {\n let pp = path.join(\".\");\n if (pp != \"\" && p.length > 0) pp = `.${pp}`;\n if (pp != \"\") pp = `${prefix}${pp}`;\n return pp;\n };\n\n const addItem = (item: string) => _errors.push(indentText(item, i));\n\n for (const issue of issues) {\n if (issue.code === \"invalid_union\") {\n addItem(`✖ Expected one of several possible values`);\n const path = formatSubpath(issue.path, \"\");\n addItem(` → at '${path}':`);\n for (const errGrp of issue.errors) {\n _errors.push(formatZodIssues(errGrp, `${i} `, [...p, ...issue.path]));\n }\n } else if (issue.code === \"invalid_element\" || issue.code === \"invalid_key\") {\n addItem(`✖ ${issue.code.replaceAll(\"_\", \" \")}:`);\n _errors.push(formatZodIssues(issue.issues, `${i} `, [...p, ...issue.path]));\n } else if (issue.code === \"invalid_type\") {\n const path = formatSubpath(issue.path, \" \");\n const prefix = `✖ (${issue.expected})${path}: `;\n const msg = indentText(issue.message, Math.min(prefix.length, 20), true);\n addItem(`${prefix}${msg}`);\n } else {\n const path = formatSubpath(issue.path, \" \");\n const prefix = `✖ (${issue.code.replaceAll(\"_\", \" \")})${path}: `;\n const msg = indentText(issue.message, Math.min(prefix.length, 20), true);\n addItem(`${prefix}${msg}`);\n }\n }\n\n return _errors.join(\"\\n\");\n};\n\n// User-facing CLI error. The top-level handler (bin/run.mjs) prints its\n// message without a stack trace and exits non-zero.\nexport class CLIErrorClass extends Error {\n constructor(msg: string | Error) {\n super(typeof msg === \"string\" ? msg : msg.message);\n this.name = \"CLIError\";\n }\n}\n\nexport function CLIError(msg: string | Error): CLIErrorClass {\n return new CLIErrorClass(msg);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAa,kBAAkB;AAC/B,MAAa,qBAAqB;AAElC,SAAgB,YAAY,IAAkB;CAC5C,MAAM,IAAI,MAAM,4CAA4C,KAAK,UAAU,EAAE,GAAG;AAClF;AAEA,SAAgB,WAAW,KAAa,QAAwB;CAC9D,IAAI,IAAI,WAAW,MAAM,GACvB,OAAO,IAAI,MAAM,OAAO,MAAM;CAEhC,OAAO;AACT;AAEA,SAAgB,WAAW,KAAa,QAAwB;CAC9D,IAAI,IAAI,SAAS,MAAM,GACrB,OAAO,IAAI,MAAM,GAAG,CAAC,OAAO,MAAM;CAEpC,OAAO;AACT;AAEA,SAAgB,gBAAgB,QAAgB,QAAqB;CACnE,MAAM,OAAO,SAAS,UAAA,GAASA,YAAAA,WAAAA,CAAW,QAAQ;CAClD,MAAM,OAAOC,QAAAA,QAAG,YAAY,QAAQ,EAAE,eAAe,KAAK,CAAC;CAE3D,KAAK,MAAM,QAAQ,MAAM;EACvB,MAAM,WAAWC,UAAK,KAAK,QAAQ,KAAK,IAAI;EAE5C,IAAI,KAAK,OAAO,GAAG;GACjB,MAAM,WAAWD,QAAAA,QAAG,SAAS,QAAQ;GACrC,M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KAAK,MAAM,KAAK,WAAW,KAAK,GAAG,EAAE,EAAE;EAC/C,QAAQ,KAAK,gBAAgB,MAAM,QAAQ,GAAG,EAAE,KAAK,CAAC,GAAG,GAAG,GAAG,MAAM,IAAI,CAAC,CAAC;CAC7E,OAAO,IAAI,MAAM,SAAS,gBAAgB;EACxC,MAAM,OAAO,cAAc,MAAM,MAAM,GAAG;EAC1C,MAAM,SAAS,MAAM,MAAM,SAAS,GAAG,KAAK;EAE5C,QAAQ,GAAG,SADC,WAAW,MAAM,SAAS,KAAK,IAAI,OAAO,QAAQ,EAAE,GAAG,IAC7C,GAAG;CAC3B,OAAO;EACL,MAAM,OAAO,cAAc,MAAM,MAAM,GAAG;EAC1C,MAAM,SAAS,MAAM,MAAM,KAAK,WAAW,KAAK,GAAG,EAAE,GAAG,KAAK;EAE7D,QAAQ,GAAG,SADC,WAAW,MAAM,SAAS,KAAK,IAAI,OAAO,QAAQ,EAAE,GAAG,IAC7C,GAAG;CAC3B;CAGF,OAAO,QAAQ,KAAK,IAAI;AAC1B;AAIA,IAAa,gBAAb,cAAmC,MAAM;CACvC,YAAY,KAAqB;EAC/B,MAAM,OAAO,QAAQ,WAAW,MAAM,IAAI,OAAO;EACjD,KAAK,OAAO;CACd;AACF;AAEA,SAAgB,SAAS,KAAoC;CAC3D,OAAO,IAAI,cAAc,GAAG;AAC9B"}
@@ -64,6 +64,5 @@ export declare class CLIErrorClass extends Error {
64
64
  constructor(msg: string | Error);
65
65
  }
66
66
  export declare function CLIError(msg: string | Error): CLIErrorClass;
67
- //#endregion
68
67
  export { util_d_exports };
69
68
  //# sourceMappingURL=util.d.ts.map
package/dist/core/util.js CHANGED
@@ -5,7 +5,7 @@ import * as path$1 from "node:path";
5
5
  import { createHash } from "node:crypto";
6
6
  import * as os from "node:os";
7
7
  import winston from "winston";
8
- //#region src/core/util.ts
8
+ // src/core/util.ts
9
9
  var util_exports = /* @__PURE__ */ __exportAll({
10
10
  AllPlatforms: () => AllPlatforms,
11
11
  AllSoftwareSources: () => AllSoftwareSources,
@@ -284,7 +284,6 @@ var CLIErrorClass = class extends Error {
284
284
  function CLIError(msg) {
285
285
  return new CLIErrorClass(msg);
286
286
  }
287
- //#endregion
288
287
  export { AllPlatforms, AllSoftwareSources, Arches, CLIError, CLIErrorClass, OSes, artifactIDFromString, artifactIDToString, assertNever, createLogger, currentArch, currentOS, currentPlatform, ensureDirsExist, findInstalledModule, findNodeModules, findPackageRoot, formatZodIssues, hashDirMetaSync, hashDirSync, indentText, isDevMode, isPlatformSupported, joinPlatform, packageJsonName, producesRegistryDescriptor, rSplit, shouldDoAction, softwareConfigName, splitPlatform, toInt, trimPrefix, trimSuffix, urlJoin, util_exports, wrapErr };
289
288
 
290
289
  //# sourceMappingURL=util.js.map
package/dist/defaults.cjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/defaults.ts
1
+ // src/defaults.ts
2
2
  var defaults_exports = /* @__PURE__ */ require("./_virtual/_rolldown/runtime.cjs").__exportAll({
3
3
  AWS_DEV_PROFILE: () => AWS_DEV_PROFILE,
4
4
  BIN_REGISTRY_DOWNLOAD_URL: () => BIN_REGISTRY_DOWNLOAD_URL,
@@ -41,7 +41,6 @@ const DEV_DOCKER_REGISTRY = "public.ecr.aws/miresearch/pl-containers";
41
41
  const DEV_DOCKER_PUSH_TARGET = `ecr://${DEV_DOCKER_REGISTRY}`;
42
42
  const AWS_DEV_PROFILE = "research-poweruser";
43
43
  const DOCKER_BUILD_PLATFORM = "linux/amd64";
44
- //#endregion
45
44
  exports.AWS_DEV_PROFILE = AWS_DEV_PROFILE;
46
45
  exports.BIN_REGISTRY_DOWNLOAD_URL = BIN_REGISTRY_DOWNLOAD_URL;
47
46
  exports.BIN_REGISTRY_NAME = BIN_REGISTRY_NAME;
@@ -22,6 +22,5 @@ export declare const DEV_DOCKER_REGISTRY = "public.ecr.aws/miresearch/pl-contain
22
22
  export declare const DEV_DOCKER_PUSH_TARGET = "ecr://public.ecr.aws/miresearch/pl-containers";
23
23
  export declare const AWS_DEV_PROFILE = "research-poweruser";
24
24
  export declare const DOCKER_BUILD_PLATFORM = "linux/amd64";
25
- //#endregion
26
25
  export { defaults_d_exports };
27
26
  //# sourceMappingURL=defaults.d.ts.map
package/dist/defaults.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { __exportAll } from "./_virtual/_rolldown/runtime.js";
2
- //#region src/defaults.ts
2
+ // src/defaults.ts
3
3
  var defaults_exports = /* @__PURE__ */ __exportAll({
4
4
  AWS_DEV_PROFILE: () => AWS_DEV_PROFILE,
5
5
  BIN_REGISTRY_DOWNLOAD_URL: () => BIN_REGISTRY_DOWNLOAD_URL,
@@ -42,7 +42,6 @@ const DEV_DOCKER_REGISTRY = "public.ecr.aws/miresearch/pl-containers";
42
42
  const DEV_DOCKER_PUSH_TARGET = `ecr://${DEV_DOCKER_REGISTRY}`;
43
43
  const AWS_DEV_PROFILE = "research-poweruser";
44
44
  const DOCKER_BUILD_PLATFORM = "linux/amd64";
45
- //#endregion
46
45
  export { AWS_DEV_PROFILE, BIN_REGISTRY_DOWNLOAD_URL, BIN_REGISTRY_NAME, CONDA_DATA_LOCATION, CONDA_DOCKER_BASE_IMAGE, CONDA_FROZEN_ENV_SPEC_FILE, CONDA_MICROMAMBA_VERSION, CONDA_SOURCE_ENV_SPEC_FILE, DEV_BINARY_UPLOAD_TARGET, DEV_BIN_REGISTRY_NAME, DEV_DOCKER_PUSH_TARGET, DEV_DOCKER_REGISTRY, DOCKER_BUILD_PLATFORM, DOCKER_DOCKERFILE, DOCKER_PLACEHOLDER_PKG, DOCKER_REGISTRY, NO_SOFTWARE_PLACEHOLDER, PYTHON_DOCKER_BASE_IMAGE, PYTHON_REQUIREMENTS_FILE, defaults_exports };
47
46
 
48
47
  //# sourceMappingURL=defaults.js.map
package/dist/index.cjs CHANGED
@@ -5,11 +5,10 @@ const require_util = require("./core/util.cjs");
5
5
  const require_docker_coverage = require("./core/docker-coverage.cjs");
6
6
  const require_core = require("./core/core.cjs");
7
7
  const require_push_guard = require("./core/push-guard.cjs");
8
- //#region src/index.ts
8
+ // src/index.ts
9
9
  function createBuilder(logger, opts) {
10
10
  return new require_core.Core(logger, opts);
11
11
  }
12
- //#endregion
13
12
  exports.assertDockerCoverage = require_docker_coverage.assertDockerCoverage;
14
13
  exports.assertDockerPushIntent = require_push_guard.assertDockerPushIntent;
15
14
  exports.createBuilder = createBuilder;
package/dist/index.d.ts CHANGED
@@ -5,7 +5,6 @@ import { defaults_d_exports } from "./defaults.js";
5
5
  import { PushIntent, assertDockerPushIntent } from "./core/push-guard.js";
6
6
  import { DockerCoverage, assertDockerCoverage, descriptorHasNoDockerVariant, softwareEntrypointsWithoutDocker } from "./core/docker-coverage.js";
7
7
  import winston from "winston";
8
- //#region src/index.d.ts
9
8
  /** The logger the engine and its callers pass around. */
10
9
  export type Logger = winston.Logger;
11
10
  /**
@@ -18,6 +17,5 @@ export type Builder = Pick<Core, "buildMode" | "targetPlatform" | "allPlatforms"
18
17
  export declare function createBuilder(logger: winston.Logger, opts?: {
19
18
  packageRoot?: string;
20
19
  }): Builder;
21
- //#endregion
22
20
  export { type DockerCoverage, type PushIntent, assertDockerCoverage, assertDockerPushIntent, defaults_d_exports as defaults, descriptorHasNoDockerVariant, envs_d_exports as envs, softwareEntrypointsWithoutDocker, util_d_exports as util };
23
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;YAeY,SAAS,QAAQ;;;;;;;YAQjB,UAAU,KACpB;wBAiBc,cAAc,QAAQ,QAAQ,QAAQ;EAAS;IAAyB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;YAeY,SAAS,QAAQ;;;;;;;YAQjB,UAAU,KACpB;wBAiBc,cAAc,QAAQ,QAAQ,QAAQ;EAAS;IAAyB"}
package/dist/index.js CHANGED
@@ -4,11 +4,10 @@ import { util_exports } from "./core/util.js";
4
4
  import { assertDockerCoverage, descriptorHasNoDockerVariant, softwareEntrypointsWithoutDocker } from "./core/docker-coverage.js";
5
5
  import { Core } from "./core/core.js";
6
6
  import { assertDockerPushIntent } from "./core/push-guard.js";
7
- //#region src/index.ts
7
+ // src/index.ts
8
8
  function createBuilder(logger, opts) {
9
9
  return new Core(logger, opts);
10
10
  }
11
- //#endregion
12
11
  export { assertDockerCoverage, assertDockerPushIntent, createBuilder, defaults_exports as defaults, descriptorHasNoDockerVariant, envs_exports as envs, softwareEntrypointsWithoutDocker, util_exports as util };
13
12
 
14
13
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/package-builder-lib",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "MiLaboratories Platforma Package builder engine (library)",
5
5
  "keywords": [],
6
6
  "license": "UNLICENSED",
@@ -21,26 +21,31 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@aws-sdk/client-s3": "3.859.0",
25
- "@aws-sdk/lib-storage": "3.859.0",
24
+ "@aws-sdk/client-s3": "3.1157.0",
25
+ "@aws-sdk/lib-storage": "3.1157.0",
26
+ "@milaboratories/resolve-helper": "1.1.3",
26
27
  "archiver": "^7.0.1",
27
- "undici": "~7.16.0",
28
+ "undici": "~7.30.1",
28
29
  "winston": "^3.17.0",
29
- "yaml": "^2.8.0",
30
- "zod": "~3.25.76",
31
- "@milaboratories/resolve-helper": "1.1.3"
30
+ "yaml": "^2.9.1",
31
+ "zod": "~3.25.76"
32
32
  },
33
33
  "devDependencies": {
34
- "@platforma-open/milaboratories.runenv-python-3": "1.13.2",
35
- "@types/archiver": "^6.0.3",
36
- "@types/node": "~24.5.2",
37
- "@vitest/coverage-istanbul": "^4.1.3",
38
- "typescript": "7.0.2",
39
- "vite": "^8.0.6",
40
- "vitest": "^4.1.3",
41
34
  "@milaboratories/build-configs": "2.0.2",
35
+ "@milaboratories/ts-builder": "1.7.3",
42
36
  "@milaboratories/ts-configs": "1.4.0",
43
- "@milaboratories/ts-builder": "1.7.2"
37
+ "@platforma-open/milaboratories.runenv-python-3": "1.16.1",
38
+ "@types/archiver": "^6.0.3",
39
+ "@types/node": "~24.19.2",
40
+ "@vitest/coverage-istanbul": "^4.1.12",
41
+ "typescript": "7.0.2",
42
+ "vite": "^8.3.5",
43
+ "vitest": "^4.1.12"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/milaboratory/platforma.git",
48
+ "directory": "lib/node/package-builder-lib"
44
49
  },
45
50
  "scripts": {
46
51
  "build": "ts-builder build --target node",
@@ -326,7 +326,7 @@ async function downloadFile(
326
326
 
327
327
  let redirCount = 0;
328
328
  let attempt = 0;
329
- for (; attempt <= maxAttempts; ) {
329
+ for (; attempt <= maxAttempts;) {
330
330
  attempt++;
331
331
 
332
332
  logger.debug(`Trying to download: ${url}`);