@tsplc/build 0.5.3 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js.map +15 -15
- package/dist/images.js.map +2 -2
- package/dist/index.js.map +13 -13
- package/docker/runner.ts +2 -2
- package/package.json +4 -4
- package/src/build.ts +2 -2
- package/src/builder-image.ts +3 -3
- package/src/cli.ts +7 -7
- package/src/controller-online.ts +6 -6
- package/src/docker-build.ts +4 -4
- package/src/docker-context.ts +1 -1
- package/src/docker-run.ts +1 -1
- package/src/engineering-settings.ts +1 -1
- package/src/images.ts +2 -2
- package/src/index.ts +9 -9
- package/src/io.ts +2 -2
- package/src/project-operations.ts +3 -3
- package/src/run.ts +1 -1
- package/src/sources.ts +1 -1
package/dist/images.js.map
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/images.ts", "../src/docker-context.ts", "../src/package-path.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { copyFile, cp, mkdir, mkdtemp, rm } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { resolve } from \"node:path\";\nimport { dockerImage } from \"@tsplc/config/build\";\nimport { builderRecipe, prepareDockerContext } from \"./docker-context
|
|
6
|
-
"import { createHash } from \"node:crypto\";\nimport {\n\tcp,\n\tmkdir,\n\tmkdtemp,\n\treaddir,\n\treadFile,\n\trm,\n\tstat,\n\twriteFile,\n} from \"node:fs/promises\";\nimport { createRequire } from \"node:module\";\nimport { tmpdir } from \"node:os\";\nimport { basename, dirname, posix, relative, resolve, sep } from \"node:path\";\nimport { z } from \"zod\";\nimport { packageDirectory } from \"./package-path
|
|
5
|
+
"import { copyFile, cp, mkdir, mkdtemp, rm } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { resolve } from \"node:path\";\nimport { dockerImage } from \"@tsplc/config/build\";\nimport { builderRecipe, prepareDockerContext } from \"./docker-context\";\nimport { packageDirectory } from \"./package-path\";\n\nexport const builderImage = dockerImage;\n\nexport const gatewayImage = \"tsplc-edge-gateway:4.22.0.0\";\n\n/** The local CODESYS Control for Linux SL runtime; it is always built here, never published. */\nexport const runtimeImage = \"tsplc-control-linux-sl:4.22.0.0\";\n\nconst registry = \"ghcr.io/livingforjesus\";\n\n/**\n * The published copy of a local image whose tag already names what is in it, as the gateway's names its CODESYS version:\n * every tsPLC that uses that version shares the one copy.\n */\nexport const publishedImage = (image: string) => `${registry}/${image}`;\n\n/**\n * The published copy of the builder image for this installation's recipe. Containers run the installed tsPLC's code, so\n * the image changes only with its recipe, and every tsPLC with the same recipe shares the one copy rather than a release\n * rebuilding the vendor installation.\n */\nexport const publishedBuilderImage = async () =>\n\t`${registry}/${builderImage.split(\":\")[0]}:recipe-${await builderRecipe()}`;\n\n/** The platform the vendor installer runs on; the compiler image itself is always AMD64. */\nexport type SetupPlatform = \"linux/amd64\" | \"linux/arm64\";\n\n/** The setup platform for a Docker server's `{{.OSType}}/{{.Architecture}}`, or null when it has none. */\nexport const setupPlatformFor = (server: string): SetupPlatform | null => {\n\tif (server === \"linux/aarch64\" || server === \"linux/arm64\") {\n\t\treturn \"linux/arm64\";\n\t}\n\tif (server === \"linux/x86_64\" || server === \"linux/amd64\") {\n\t\treturn \"linux/amd64\";\n\t}\n\treturn null;\n};\n\n/** The label an image built by `buildBuilderImage` carries its `builderRecipe` in. */\nexport const recipeLabel = \"tsplc.recipe\";\n\n/**\n * Builds the builder image from the full recipe, labelled with it. `installer` is a local CODESYS installer,\n * or null to download the official one; `winetricksCache` seeds the prerequisite downloads.\n * `docker` runs one Docker client command, so each caller keeps its own terminal handling.\n */\nexport async function buildBuilderImage(options: {\n\ttag: string;\n\tsetupPlatform: SetupPlatform;\n\tinstaller: string | null;\n\twinetricksCache: string | null;\n\tdocker: (args: string[]) => Promise<void>;\n}) {\n\tconst installerContext = await mkdtemp(\n\t\tresolve(tmpdir(), \"codesys-installer-\"),\n\t);\n\tlet context: string | undefined;\n\ttry {\n\t\tcontext = await prepareDockerContext();\n\t\tconst cache = resolve(installerContext, \"winetricks\");\n\t\tawait mkdir(cache);\n\t\tif (options.winetricksCache) {\n\t\t\tawait cp(options.winetricksCache, cache, { recursive: true });\n\t\t}\n\t\tif (options.installer) {\n\t\t\tawait copyFile(\n\t\t\t\toptions.installer,\n\t\t\t\tresolve(installerContext, \"codesys.exe\"),\n\t\t\t);\n\t\t}\n\t\tconst arm = options.setupPlatform === \"linux/arm64\";\n\t\t// FEX handles ARM setup's 32-bit prerequisites; the compiler runtime stays AMD64.\n\t\tawait options.docker([\n\t\t\t\"build\",\n\t\t\t\"--platform\",\n\t\t\t\"linux/amd64\",\n\t\t\t\"--build-arg\",\n\t\t\t`SETUP_BASE=${arm ? \"arm-setup\" : \"base\"}`,\n\t\t\t\"--build-arg\",\n\t\t\t`SETUP_PLATFORM=${options.setupPlatform}`,\n\t\t\t\"--build-arg\",\n\t\t\t`INSTALLER_SOURCE=${options.installer ? \"installer-local\" : \"installer-download\"}`,\n\t\t\t\"--label\",\n\t\t\t`${recipeLabel}=${await builderRecipe()}`,\n\t\t\t\"--progress\",\n\t\t\t\"plain\",\n\t\t\t\"--build-context\",\n\t\t\t`installer=${installerContext}`,\n\t\t\t\"-f\",\n\t\t\tresolve(context, \"docker/Dockerfile\"),\n\t\t\t\"-t\",\n\t\t\toptions.tag,\n\t\t\tcontext,\n\t\t]);\n\t} finally {\n\t\tawait Promise.all([\n\t\t\trm(installerContext, { recursive: true, force: true }),\n\t\t\t...(context ? [rm(context, { recursive: true, force: true })] : []),\n\t\t]);\n\t}\n}\n\n/** Builds the local CODESYS Control for Linux SL runtime, the device a production build targets. */\nexport const buildRuntimeImage = (options: {\n\ttag: string;\n\tdocker: (args: string[]) => Promise<void>;\n}) =>\n\toptions.docker([\n\t\t\"build\",\n\t\t\"--platform\",\n\t\t\"linux/amd64\",\n\t\t\"--progress\",\n\t\t\"plain\",\n\t\t\"-t\",\n\t\toptions.tag,\n\t\tresolve(packageDirectory, \"docker/control-linux-sl\"),\n\t]);\n\nexport const buildGatewayImage = (options: {\n\ttag: string;\n\tdocker: (args: string[]) => Promise<void>;\n}) =>\n\toptions.docker([\n\t\t\"build\",\n\t\t\"--platform\",\n\t\t\"linux/amd64\",\n\t\t\"--progress\",\n\t\t\"plain\",\n\t\t\"-t\",\n\t\toptions.tag,\n\t\tresolve(packageDirectory, \"docker/edge-gateway\"),\n\t]);\n",
|
|
6
|
+
"import { createHash } from \"node:crypto\";\nimport {\n\tcp,\n\tmkdir,\n\tmkdtemp,\n\treaddir,\n\treadFile,\n\trm,\n\tstat,\n\twriteFile,\n} from \"node:fs/promises\";\nimport { createRequire } from \"node:module\";\nimport { tmpdir } from \"node:os\";\nimport { basename, dirname, posix, relative, resolve, sep } from \"node:path\";\nimport { z } from \"zod\";\nimport { packageDirectory } from \"./package-path\";\n\nconst includeSource = (source: string) => {\n\tconst name = basename(source);\n\treturn (\n\t\tname !== \"__pycache__\" &&\n\t\tname !== \".DS_Store\" &&\n\t\t!name.endsWith(\".pyc\") &&\n\t\t!name.endsWith(\".test.ts\") &&\n\t\t!name.endsWith(\".fixtures.ts\") &&\n\t\t!(name.startsWith(\"test_\") && name.endsWith(\".py\"))\n\t);\n};\n\n/**\n * The workspace packages container code imports, each copied with the files Bun runs it from,\n * to `directory` in the context and `image` in the image.\n */\nconst containerPackages = [\n\t{\n\t\tentry: \"@tsplc/config/build\",\n\t\tdirectory: \"shared-config\",\n\t\timage: \"/opt/tsplc-config\",\n\t\tfiles: [\"src\", \"templates\", \"package.json\"],\n\t},\n\t{\n\t\tentry: \"@tsplc/iec\",\n\t\tdirectory: \"shared-iec\",\n\t\timage: \"/opt/tsplc-iec\",\n\t\tfiles: [\"src\", \"package.json\"],\n\t},\n];\n\n/** Where the image keeps this package. */\nconst imagePackage = \"/opt/codesys-build\";\n/**\n * This package's files that the image runs and a container may take from the installed package\n * instead: everything the runner imports and the CODESYS scripts. The entrypoint stays the image's.\n */\nconst packageCode = [\"src\", \"python\", \"docker/runner.ts\", \"docker/config.ts\"];\n\nconst packageRoot = (entry: string) =>\n\tresolve(dirname(createRequire(import.meta.url).resolve(entry)), \"..\");\n\n/** A host file or directory and the path in the image it replaces. */\nexport interface ContainerMount {\n\tsource: string;\n\ttarget: string;\n}\n\n/**\n * The code a builder container runs, as this installation has it, and where the image keeps its\n * own copy. Mounted over the image's, it makes a container run this installation's tsPLC whatever\n * tsPLC built the image, so only a change of the image's recipe needs a new image.\n */\nexport const containerCode = (): ContainerMount[] => [\n\t...packageCode.map((path) => ({\n\t\tsource: resolve(packageDirectory, path),\n\t\ttarget: posix.join(imagePackage, path),\n\t})),\n\t...containerPackages.flatMap(({ entry, image, files }) =>\n\t\tfiles.map((file) => ({\n\t\t\tsource: resolve(packageRoot(entry), file),\n\t\t\ttarget: posix.join(image, file),\n\t\t})),\n\t),\n];\n\n/** Every file under `path`, or `path` itself, that `include` keeps, by its path relative to `root`. */\nconst listFiles = async (\n\troot: string,\n\tpath: string,\n\tinclude: (relativePath: string) => boolean,\n): Promise<string[]> => {\n\tconst name = relative(root, path).split(sep).join(\"/\");\n\tif (!include(name)) {\n\t\treturn [];\n\t}\n\tif (!(await stat(path)).isDirectory()) {\n\t\treturn [name];\n\t}\n\tconst entries = await readdir(path);\n\treturn (\n\t\tawait Promise.all(\n\t\t\tentries.map((entry) => listFiles(root, resolve(path, entry), include)),\n\t\t)\n\t).flat();\n};\n\n/** A digest of named texts and files, which changes when a name or a file's content does. */\nconst digestFiles = async (\n\tfiles: { name: string; path: string }[],\n\ttexts: Record<string, string>,\n) => {\n\tconst hash = createHash(\"sha256\");\n\tfor (const [name, text] of Object.entries(texts)) {\n\t\thash.update(`${name}\\0${text}\\0`);\n\t}\n\tfor (const file of [...files].sort((a, b) => a.name.localeCompare(b.name))) {\n\t\thash.update(`${file.name}\\0`);\n\t\thash.update(await readFile(file.path));\n\t\thash.update(\"\\0\");\n\t}\n\treturn hash.digest(\"hex\");\n};\n\n/**\n * A digest of the code `containerCode` mounts, which a long-running container is labelled with so\n * that one running other code is replaced.\n */\nexport const containerCodeDigest = async () =>\n\tdigestFiles(\n\t\t(\n\t\t\tawait Promise.all(\n\t\t\t\tcontainerCode().map(async ({ source, target }) =>\n\t\t\t\t\t(\n\t\t\t\t\t\tawait listFiles(dirname(source), source, (path) =>\n\t\t\t\t\t\t\tincludeSource(basename(path)),\n\t\t\t\t\t\t)\n\t\t\t\t\t).map((name) => ({\n\t\t\t\t\t\tname: posix.join(posix.dirname(target), name),\n\t\t\t\t\t\tpath: resolve(dirname(source), name),\n\t\t\t\t\t})),\n\t\t\t\t),\n\t\t\t)\n\t\t).flat(),\n\t\t{},\n\t);\n\nconst manifestDependencies = z.object({\n\tname: z.string(),\n\tdependencies: z.record(z.string(), z.string()).default({}),\n});\n\n/**\n * The third-party packages the image installs: what this package and each package the\n * context carries depend on, at the versions their manifests pin.\n */\nexport function containerDependencies(\n\tmanifests: z.infer<typeof manifestDependencies>[],\n) {\n\tconst selected = new Map<string, { version: string; owner: string }>();\n\tfor (const manifest of manifests) {\n\t\tfor (const [name, version] of Object.entries(manifest.dependencies)) {\n\t\t\tif (name.startsWith(\"@tsplc/\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst existing = selected.get(name);\n\t\t\tif (existing && existing.version !== version) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`The builder image cannot install ${name}: ${existing.owner} pins ${existing.version} and ${manifest.name} pins ${version}.`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tselected.set(name, { version, owner: manifest.name });\n\t\t}\n\t}\n\treturn Object.fromEntries(\n\t\t[...selected].map(([name, { version }]) => [name, version]),\n\t);\n}\n\nconst readManifest = async (directory: string) =>\n\tmanifestDependencies.parse(\n\t\tJSON.parse(await readFile(resolve(directory, \"package.json\"), \"utf8\")),\n\t);\n\n/** The manifest of the third-party packages the image installs, as its recipe writes it. */\nexport const containerManifest = async () => {\n\tconst manifests = [await readManifest(packageDirectory)];\n\tfor (const { entry } of containerPackages) {\n\t\tmanifests.push(await readManifest(packageRoot(entry)));\n\t}\n\treturn { type: \"module\", dependencies: containerDependencies(manifests) };\n};\n\n/**\n * The files of the image's recipe that its containers can't take from the installed package: the\n * Dockerfile, the entrypoint and the installation's scripts and data. Tests and checks of the\n * installation's own tools stay out, as the published package leaves them out, and so does\n * `.npmignore`, which npm never packs: an image built from a checkout carries the recipe an\n * installed tsPLC computes, so it finds the image published under that recipe current.\n */\nconst recipeFile = (path: string) =>\n\tpath === \"docker\" ||\n\tpath === \"docker/Dockerfile\" ||\n\tpath === \"docker/entrypoint.sh\" ||\n\t((path === \"docker/install\" || path.startsWith(\"docker/install/\")) &&\n\t\tincludeSource(basename(path)) &&\n\t\tbasename(path) !== \".npmignore\" &&\n\t\t!path.split(\"/\").includes(\"tests\") &&\n\t\tpath !== \"docker/install/wine-signal/check.sh\");\n\n/**\n * The builder image's recipe: what it installs and how. An image built from another recipe has\n * another vendor installation or other third-party packages, so its containers can't run this\n * installation's code, while one built from this recipe runs any tsPLC with this recipe.\n */\nexport const builderRecipe = async () =>\n\tdigestFiles(\n\t\t(await recipeFiles()).map((name) => ({\n\t\t\tname,\n\t\t\tpath: resolve(packageDirectory, name),\n\t\t})),\n\t\t{ manifest: JSON.stringify(await containerManifest()) },\n\t);\n\n/** The package's files `builderRecipe` covers, beside the third-party manifest. */\nexport const recipeFiles = () =>\n\tlistFiles(packageDirectory, resolve(packageDirectory, \"docker\"), recipeFile);\n\nexport async function prepareDockerContext() {\n\tconst context = await mkdtemp(resolve(tmpdir(), \"tsplc-docker-\"));\n\ttry {\n\t\tfor (const directory of [\"src\", \"python\", \"docker\", \"runtime\"]) {\n\t\t\tawait cp(\n\t\t\t\tresolve(packageDirectory, directory),\n\t\t\t\tresolve(context, directory),\n\t\t\t\t{\n\t\t\t\t\trecursive: true,\n\t\t\t\t\tfilter: includeSource,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\t\tfor (const { entry, directory, files } of containerPackages) {\n\t\t\tconst root = packageRoot(entry);\n\t\t\tawait mkdir(resolve(context, directory));\n\t\t\tfor (const file of files) {\n\t\t\t\tawait cp(resolve(root, file), resolve(context, directory, file), {\n\t\t\t\t\trecursive: true,\n\t\t\t\t\tfilter: includeSource,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tawait writeFile(\n\t\t\tresolve(context, \"package.json\"),\n\t\t\tJSON.stringify(await containerManifest()),\n\t\t);\n\t\treturn context;\n\t} catch (cause) {\n\t\tawait rm(context, { recursive: true, force: true });\n\t\tthrow cause;\n\t}\n}\n",
|
|
7
7
|
"import { resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\n// Both source modules and published bundles live one directory below the package root.\nexport const packageDirectory = resolve(\n\tfileURLToPath(new URL(\"..\", import.meta.url)),\n);\n"
|
|
8
8
|
],
|
|
9
9
|
"mappings": ";AAAA,yBAAmB,cAAI,mBAAO,gBAAS;AACvC,mBAAS;AACT,oBAAS;AACT;;;ACHA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AACA;AACA,wDAA6C;AAC7C;;;ACdA;AACA;AAGO,IAAM,mBAAmB,QAC/B,cAAc,IAAI,IAAI,MAAM,YAAY,GAAG,CAAC,CAC7C;;;ADWA,IAAM,gBAAgB,CAAC,WAAmB;AAAA,EACzC,MAAM,OAAO,SAAS,MAAM;AAAA,EAC5B,OACC,SAAS,iBACT,SAAS,eACT,CAAC,KAAK,SAAS,MAAM,KACrB,CAAC,KAAK,SAAS,UAAU,KACzB,CAAC,KAAK,SAAS,cAAc,KAC7B,EAAE,KAAK,WAAW,OAAO,KAAK,KAAK,SAAS,KAAK;AAAA;AAQnD,IAAM,oBAAoB;AAAA,EACzB;AAAA,IACC,OAAO;AAAA,IACP,WAAW;AAAA,IACX,OAAO;AAAA,IACP,OAAO,CAAC,OAAO,aAAa,cAAc;AAAA,EAC3C;AAAA,EACA;AAAA,IACC,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