beckhoff-xts-viewer-3d 6.2.0 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,208 +1,208 @@
1
- {
2
- "name": "beckhoff-xts-viewer-3d",
3
- "version": "6.2.0",
4
- "description": "Unofficial, independent React component for rendering Beckhoff XTS linear-motor systems in 3D using Three.js. Not a Beckhoff product and not affiliated with or endorsed by Beckhoff Automation GmbH & Co. KG.",
5
- "keywords": [
6
- "xts",
7
- "beckhoff",
8
- "three",
9
- "threejs",
10
- "react",
11
- "3d",
12
- "viewer",
13
- "linear-motor",
14
- "hepco",
15
- "gfx",
16
- "react-three-fiber"
17
- ],
18
- "author": "Philipp Leidig",
19
- "license": "MIT",
20
- "homepage": "https://github.com/philippleidig/beckhoff-xts-viewer-3d#readme",
21
- "bugs": {
22
- "url": "https://github.com/philippleidig/beckhoff-xts-viewer-3d/issues"
23
- },
24
- "repository": {
25
- "type": "git",
26
- "url": "git+https://github.com/philippleidig/beckhoff-xts-viewer-3d.git"
27
- },
28
- "type": "module",
29
- "main": "./dist/index.cjs",
30
- "module": "./dist/index.js",
31
- "types": "./dist/index.d.ts",
32
- "exports": {
33
- ".": {
34
- "types": "./dist/index.d.ts",
35
- "import": "./dist/index.js",
36
- "require": "./dist/index.cjs"
37
- }
38
- },
39
- "files": [
40
- "dist",
41
- "scripts/postinstall-disclaimer.mjs",
42
- "docs/screenshots/*.webp",
43
- "README.md",
44
- "LICENSE"
45
- ],
46
- "sideEffects": false,
47
- "engines": {
48
- "node": ">=20"
49
- },
50
- "packageManager": "pnpm@10.23.0",
51
- "scripts": {
52
- "//-postinstall": "Prints the \"not a Beckhoff product\" disclaimer when the package is installed as a dependency; silent inside this repository. Best-effort only — npm 7+ hides dependency script output, pnpm 10+ blocks these scripts unless allow-listed, and --ignore-scripts skips them. The README block is the guaranteed channel.",
53
- "postinstall": "node scripts/postinstall-disclaimer.mjs",
54
- "build": "tsup",
55
- "prebuild": "pnpm run sync-version && pnpm run sync-assets-cdn-version && pnpm run assets:bundle-sidecars",
56
- "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
57
- "prepublishOnly": "pnpm run clean && pnpm run typecheck && pnpm test && pnpm run build",
58
- "version": "pnpm run sync-version && pnpm run sync-assets-cdn-version && pnpm run assets:bundle-sidecars && git add src/version.ts src/assets/assetsVersion.ts src/assets/builtinSidecars.ts",
59
- "sync-version": "node scripts/sync-version.mjs",
60
- "sync-assets-cdn-version": "node scripts/sync-assets-cdn-version.mjs",
61
- "dev": "vite",
62
- "playground:build": "vite build",
63
- "docs:capture-screenshots": "node scripts/capture-screenshots.mjs",
64
- "docs:copy-screenshots": "node scripts/docs-copy-screenshots.mjs",
65
- "docs:dev": "pnpm run docs:copy-screenshots && vitepress dev docs",
66
- "docs:build": "pnpm run docs:copy-screenshots && vitepress build docs",
67
- "docs:preview": "vitepress preview docs",
68
- "docs:build:playground": "vite build --base /beckhoff-xts-viewer-3d/playground/ --outDir ../docs/.vitepress/dist/playground --emptyOutDir",
69
- "docs:build:all": "pnpm run docs:build && pnpm run docs:build:playground",
70
- "verify": "pnpm run lint && pnpm run format:check && pnpm run typecheck && pnpm run test:coverage && pnpm run build && pnpm run check-generated && pnpm run docs:build:all",
71
- "//-check-generated": "`prebuild` regenerates these three from public/models and package.json, and nothing verified that the committed copies matched what it produced. A stale sidecar in public/models, or a generator run with different inputs, would ship a bundle nobody had looked at. Runs after build, so it checks what the build just wrote.",
72
- "check-generated": "git diff --exit-code -- src/version.ts src/assets/assetsVersion.ts src/assets/builtinSidecars.ts",
73
- "test": "vitest run",
74
- "test:watch": "vitest",
75
- "test:ui": "vitest --ui",
76
- "test:coverage": "vitest run --coverage",
77
- "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.typecheck.json",
78
- "//-lint": "Warning budget is a ratchet, not a target: it sits at the current count so a new warning fails the build. Lower it as warnings are fixed; never raise it to make a red build pass. The rules that must never regress at all (max-lines) are errors.",
79
- "lint": "eslint . --max-warnings 17",
80
- "lint:fix": "eslint . --fix",
81
- "format": "prettier --write .",
82
- "format:check": "prettier --check .",
83
- "release": "semantic-release",
84
- "release:dry-run": "semantic-release --dry-run --no-ci",
85
- "release:deprecate-old": "node scripts/deprecate-manual.mjs",
86
- "release:local": "node scripts/release-local.mjs",
87
- "release:local:dry-run": "node scripts/release-local.mjs --dry-run",
88
- "assets:convert": "node scripts/convert-step-to-glb.mjs",
89
- "assets:optimize": "node scripts/optimize-glb.mjs",
90
- "assets:apply-materials": "node scripts/apply-materials.mjs",
91
- "assets:inspect": "node scripts/inspect-glb-all.mjs",
92
- "assets:normalize": "node scripts/normalize-glb-names.mjs",
93
- "assets:diagnose-step-colors": "node scripts/diagnose-step-colors.mjs",
94
- "assets:verify-colors": "node scripts/diagnose-step-colors.mjs --verify",
95
- "assets:generate-sidecars": "node scripts/generate-sidecars.mjs",
96
- "assets:generate-mover-sidecars": "node scripts/generate-mover-sidecars.mjs",
97
- "assets:fit-hepco-seating": "node scripts/fit-hepco-carriage-seating.mjs",
98
- "assets:bundle-sidecars": "node scripts/bundle-sidecars.mjs",
99
- "assets:bundle-label-font": "node scripts/bundle-label-font.mjs",
100
- "assets:build-package": "node scripts/build-assets-package.mjs"
101
- },
102
- "peerDependencies": {
103
- "@react-three/drei": ">=10.0.0",
104
- "@react-three/fiber": ">=9.0.0",
105
- "@react-three/postprocessing": ">=3.0.0",
106
- "postprocessing": ">=6.39.2",
107
- "react": "^19.0.0",
108
- "react-dom": "^19.0.0",
109
- "three": ">=0.181.0",
110
- "three-stdlib": ">=2.36.0"
111
- },
112
- "peerDependenciesMeta": {
113
- "react": {
114
- "optional": false
115
- },
116
- "react-dom": {
117
- "optional": false
118
- },
119
- "three": {
120
- "optional": false
121
- },
122
- "@react-three/fiber": {
123
- "optional": false
124
- },
125
- "@react-three/drei": {
126
- "optional": false
127
- },
128
- "three-stdlib": {
129
- "optional": false
130
- },
131
- "@react-three/postprocessing": {
132
- "optional": true
133
- },
134
- "postprocessing": {
135
- "optional": true
136
- }
137
- },
138
- "devDependencies": {
139
- "@dnd-kit/core": "^6.3.1",
140
- "@dnd-kit/sortable": "^10.0.0",
141
- "@dnd-kit/utilities": "^3.2.2",
142
- "@eslint/js": "^10.0.1",
143
- "@fontsource/roboto-condensed": "5.3.0",
144
- "@gltf-transform/cli": "^4.4.2",
145
- "@react-three/drei": "^10.7.8",
146
- "@react-three/fiber": "^9.7.0",
147
- "@react-three/postprocessing": "^3.1.1",
148
- "@react-three/test-renderer": "^9.1.1",
149
- "@semantic-release/changelog": "^7.0.0",
150
- "@semantic-release/exec": "^7.1.0",
151
- "@semantic-release/git": "^11.0.1",
152
- "@types/node": "^26.4.0",
153
- "@types/react": "^19.2.18",
154
- "@types/react-dom": "^19.2.5",
155
- "@types/three": "^0.186.0",
156
- "@vitejs/plugin-react": "^6.1.0",
157
- "@vitest/coverage-v8": "^5.0.0",
158
- "@vitest/ui": "^5.0.0",
159
- "eslint": "^10.9.1",
160
- "eslint-plugin-react-hooks": "^7.1.1",
161
- "fast-check": "^4.9.0",
162
- "fast-xml-parser": "^5.11.1",
163
- "occt-import-js": "^0.0.23",
164
- "postprocessing": "^6.39.2",
165
- "prettier": "^3.9.6",
166
- "react": "^19.2.8",
167
- "react-dom": "^19.2.8",
168
- "semantic-release": "^25.0.9",
169
- "three": "^0.186.0",
170
- "three-stdlib": "^2.36.1",
171
- "tsup": "^8.5.1",
172
- "typescript": "^6.0.3",
173
- "typescript-eslint": "^8.68.0",
174
- "vite": "^8.2.2",
175
- "vitepress": "^1.6.4",
176
- "vitest": "^5.0.0"
177
- },
178
- "publishConfig": {
179
- "access": "public",
180
- "registry": "https://registry.npmjs.org/"
181
- },
182
- "pnpm": {
183
- "//": "Mirror of the .npmrc settings as camelCase keys for newer pnpm versions that prefer the package.json config block. minimumReleaseAge is in minutes (4320 = 72 h) and must stay equal to the .npmrc value and to dependabot.yml's npm `cooldown.default-days` (3). blockExoticSubdeps rejects subdependencies that use exotic protocols (git/url/file).",
184
- "minimumReleaseAge": 4320,
185
- "blockExoticSubdeps": true,
186
- "//-builds": "Allow-list of packages whose install scripts may run. Anything else in node_modules has its postinstall/preinstall/install scripts blocked, neutering the most common malware vector.",
187
- "onlyBuiltDependencies": [
188
- "esbuild"
189
- ],
190
- "//-overrides": "Transitive dev-only dependencies pinned forward to their patched releases so `pnpm audit` stays clean. None of these reach the published bundle — dist/ contains only src/ with the peer deps externalised. Keyed by major where several majors coexist in the tree. Drop an entry once every direct dependency has caught up on its own.",
191
- "//-overrides-esbuild": "esbuild@0.27 is the second entry that crosses a 0.x major: GHSA-g7r4-m6w7-qqqr (arbitrary file read via the dev server on Windows) covers >=0.27.3 <0.28.1, and the 0.27 line has no patched release — the fix only exists from 0.28.1 onward. tsup 8.5.1 still declares esbuild ^0.27.0 and there is no later tsup, so the override is the only way forward; vite 8 already accepts ^0.27.0 || ^0.28.0, so only tsup is being held past its declared range. Verified against this combination: pnpm verify passes, which builds dist/ through tsup. Drop it once tsup declares ^0.28.",
192
- "//-overrides-vite": "vite@5 is the other entry that crosses a major (see //-overrides-esbuild): vitepress 1.6.4 depends on vite ^5.4.14, and the fs.deny / path-traversal / launch-editor advisories are only fixed from 6.4.2 onward — the 5.x line ends at 5.4.21 with no patch. Verified against this combination: docs:dev serves, docs:build and docs:build:all both complete. Drop it for a plain vitepress bump as soon as vitepress 2 leaves alpha, since 2.x is on vite 6+ on its own.",
193
- "overrides": {
194
- "brace-expansion@2": "^2.1.4",
195
- "esbuild@0.21": "^0.25.12",
196
- "esbuild@0.27": "^0.28.1",
197
- "form-data@4": "^4.0.6",
198
- "js-yaml@4": "^4.3.1",
199
- "nanoid@3": "^3.3.18",
200
- "postcss@8": "^8.5.23",
201
- "sharp": "^0.35.0",
202
- "tmp": "^0.2.7",
203
- "undici@6": "^6.27.0",
204
- "undici@7": "^7.29.0",
205
- "vite@5": "^6.4.3"
206
- }
207
- }
208
- }
1
+ {
2
+ "name": "beckhoff-xts-viewer-3d",
3
+ "version": "6.3.0",
4
+ "description": "Unofficial, independent React component for rendering Beckhoff XTS linear-motor systems in 3D using Three.js. Not a Beckhoff product and not affiliated with or endorsed by Beckhoff Automation GmbH & Co. KG.",
5
+ "keywords": [
6
+ "xts",
7
+ "beckhoff",
8
+ "three",
9
+ "threejs",
10
+ "react",
11
+ "3d",
12
+ "viewer",
13
+ "linear-motor",
14
+ "hepco",
15
+ "gfx",
16
+ "react-three-fiber"
17
+ ],
18
+ "author": "Philipp Leidig",
19
+ "license": "MIT",
20
+ "homepage": "https://github.com/philippleidig/beckhoff-xts-viewer-3d#readme",
21
+ "bugs": {
22
+ "url": "https://github.com/philippleidig/beckhoff-xts-viewer-3d/issues"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/philippleidig/beckhoff-xts-viewer-3d.git"
27
+ },
28
+ "type": "module",
29
+ "main": "./dist/index.cjs",
30
+ "module": "./dist/index.js",
31
+ "types": "./dist/index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js",
36
+ "require": "./dist/index.cjs"
37
+ }
38
+ },
39
+ "files": [
40
+ "dist",
41
+ "scripts/postinstall-disclaimer.mjs",
42
+ "docs/screenshots/*.webp",
43
+ "README.md",
44
+ "LICENSE"
45
+ ],
46
+ "sideEffects": false,
47
+ "engines": {
48
+ "node": ">=20"
49
+ },
50
+ "packageManager": "pnpm@10.23.0",
51
+ "scripts": {
52
+ "//-postinstall": "Prints the \"not a Beckhoff product\" disclaimer when the package is installed as a dependency; silent inside this repository. Best-effort only — npm 7+ hides dependency script output, pnpm 10+ blocks these scripts unless allow-listed, and --ignore-scripts skips them. The README block is the guaranteed channel.",
53
+ "postinstall": "node scripts/postinstall-disclaimer.mjs",
54
+ "build": "tsup",
55
+ "prebuild": "pnpm run sync-version && pnpm run sync-assets-cdn-version && pnpm run assets:bundle-sidecars",
56
+ "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
57
+ "prepublishOnly": "pnpm run clean && pnpm run typecheck && pnpm test && pnpm run build",
58
+ "version": "pnpm run sync-version && pnpm run sync-assets-cdn-version && pnpm run assets:bundle-sidecars && git add src/version.ts src/assets/assetsVersion.ts src/assets/builtinSidecars.ts",
59
+ "sync-version": "node scripts/sync-version.mjs",
60
+ "sync-assets-cdn-version": "node scripts/sync-assets-cdn-version.mjs",
61
+ "dev": "vite",
62
+ "playground:build": "vite build",
63
+ "docs:capture-screenshots": "node scripts/capture-screenshots.mjs",
64
+ "docs:copy-screenshots": "node scripts/docs-copy-screenshots.mjs",
65
+ "docs:dev": "pnpm run docs:copy-screenshots && vitepress dev docs",
66
+ "docs:build": "pnpm run docs:copy-screenshots && vitepress build docs",
67
+ "docs:preview": "vitepress preview docs",
68
+ "docs:build:playground": "vite build --base /beckhoff-xts-viewer-3d/playground/ --outDir ../docs/.vitepress/dist/playground --emptyOutDir",
69
+ "docs:build:all": "pnpm run docs:build && pnpm run docs:build:playground",
70
+ "verify": "pnpm run lint && pnpm run format:check && pnpm run typecheck && pnpm run test:coverage && pnpm run build && pnpm run check-generated && pnpm run docs:build:all",
71
+ "//-check-generated": "`prebuild` regenerates these three from public/models and package.json, and nothing verified that the committed copies matched what it produced. A stale sidecar in public/models, or a generator run with different inputs, would ship a bundle nobody had looked at. Runs after build, so it checks what the build just wrote.",
72
+ "check-generated": "git diff --exit-code -- src/version.ts src/assets/assetsVersion.ts src/assets/builtinSidecars.ts",
73
+ "test": "vitest run",
74
+ "test:watch": "vitest",
75
+ "test:ui": "vitest --ui",
76
+ "test:coverage": "vitest run --coverage",
77
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.typecheck.json",
78
+ "//-lint": "Warning budget is a ratchet, not a target: it sits at the current count so a new warning fails the build. Lower it as warnings are fixed; never raise it to make a red build pass. The rules that must never regress at all (max-lines) are errors.",
79
+ "lint": "eslint . --max-warnings 17",
80
+ "lint:fix": "eslint . --fix",
81
+ "format": "prettier --write .",
82
+ "format:check": "prettier --check .",
83
+ "release": "semantic-release",
84
+ "release:dry-run": "semantic-release --dry-run --no-ci",
85
+ "release:deprecate-old": "node scripts/deprecate-manual.mjs",
86
+ "release:local": "node scripts/release-local.mjs",
87
+ "release:local:dry-run": "node scripts/release-local.mjs --dry-run",
88
+ "assets:convert": "node scripts/convert-step-to-glb.mjs",
89
+ "assets:optimize": "node scripts/optimize-glb.mjs",
90
+ "assets:apply-materials": "node scripts/apply-materials.mjs",
91
+ "assets:inspect": "node scripts/inspect-glb-all.mjs",
92
+ "assets:normalize": "node scripts/normalize-glb-names.mjs",
93
+ "assets:diagnose-step-colors": "node scripts/diagnose-step-colors.mjs",
94
+ "assets:verify-colors": "node scripts/diagnose-step-colors.mjs --verify",
95
+ "assets:generate-sidecars": "node scripts/generate-sidecars.mjs",
96
+ "assets:generate-mover-sidecars": "node scripts/generate-mover-sidecars.mjs",
97
+ "assets:fit-hepco-seating": "node scripts/fit-hepco-carriage-seating.mjs",
98
+ "assets:bundle-sidecars": "node scripts/bundle-sidecars.mjs",
99
+ "assets:bundle-label-font": "node scripts/bundle-label-font.mjs",
100
+ "assets:build-package": "node scripts/build-assets-package.mjs"
101
+ },
102
+ "peerDependencies": {
103
+ "@react-three/drei": ">=10.0.0",
104
+ "@react-three/fiber": ">=9.0.0",
105
+ "@react-three/postprocessing": ">=3.0.0",
106
+ "postprocessing": ">=6.39.2",
107
+ "react": "^19.0.0",
108
+ "react-dom": "^19.0.0",
109
+ "three": ">=0.181.0",
110
+ "three-stdlib": ">=2.36.0"
111
+ },
112
+ "peerDependenciesMeta": {
113
+ "react": {
114
+ "optional": false
115
+ },
116
+ "react-dom": {
117
+ "optional": false
118
+ },
119
+ "three": {
120
+ "optional": false
121
+ },
122
+ "@react-three/fiber": {
123
+ "optional": false
124
+ },
125
+ "@react-three/drei": {
126
+ "optional": false
127
+ },
128
+ "three-stdlib": {
129
+ "optional": false
130
+ },
131
+ "@react-three/postprocessing": {
132
+ "optional": true
133
+ },
134
+ "postprocessing": {
135
+ "optional": true
136
+ }
137
+ },
138
+ "devDependencies": {
139
+ "@dnd-kit/core": "^6.3.1",
140
+ "@dnd-kit/sortable": "^10.0.0",
141
+ "@dnd-kit/utilities": "^3.2.2",
142
+ "@eslint/js": "^10.0.1",
143
+ "@fontsource/roboto-condensed": "5.3.0",
144
+ "@gltf-transform/cli": "^4.4.2",
145
+ "@react-three/drei": "^10.7.8",
146
+ "@react-three/fiber": "^9.7.0",
147
+ "@react-three/postprocessing": "^3.1.1",
148
+ "@react-three/test-renderer": "^9.1.1",
149
+ "@semantic-release/changelog": "^7.0.0",
150
+ "@semantic-release/exec": "^7.1.0",
151
+ "@semantic-release/git": "^11.0.1",
152
+ "@types/node": "^26.4.0",
153
+ "@types/react": "^19.2.18",
154
+ "@types/react-dom": "^19.2.5",
155
+ "@types/three": "^0.186.0",
156
+ "@vitejs/plugin-react": "^6.1.0",
157
+ "@vitest/coverage-v8": "^5.0.0",
158
+ "@vitest/ui": "^5.0.0",
159
+ "eslint": "^10.9.1",
160
+ "eslint-plugin-react-hooks": "^7.1.1",
161
+ "fast-check": "^4.9.0",
162
+ "fast-xml-parser": "^5.11.1",
163
+ "occt-import-js": "^0.0.23",
164
+ "postprocessing": "^6.39.2",
165
+ "prettier": "^3.9.6",
166
+ "react": "^19.2.8",
167
+ "react-dom": "^19.2.8",
168
+ "semantic-release": "^25.0.9",
169
+ "three": "^0.186.0",
170
+ "three-stdlib": "^2.36.1",
171
+ "tsup": "^8.5.1",
172
+ "typescript": "^6.0.3",
173
+ "typescript-eslint": "^8.68.0",
174
+ "vite": "^8.2.2",
175
+ "vitepress": "^1.6.4",
176
+ "vitest": "^5.0.0"
177
+ },
178
+ "publishConfig": {
179
+ "access": "public",
180
+ "registry": "https://registry.npmjs.org/"
181
+ },
182
+ "pnpm": {
183
+ "//": "Mirror of the .npmrc settings as camelCase keys for newer pnpm versions that prefer the package.json config block. minimumReleaseAge is in minutes (4320 = 72 h) and must stay equal to the .npmrc value and to dependabot.yml's npm `cooldown.default-days` (3). blockExoticSubdeps rejects subdependencies that use exotic protocols (git/url/file).",
184
+ "minimumReleaseAge": 4320,
185
+ "blockExoticSubdeps": true,
186
+ "//-builds": "Allow-list of packages whose install scripts may run. Anything else in node_modules has its postinstall/preinstall/install scripts blocked, neutering the most common malware vector.",
187
+ "onlyBuiltDependencies": [
188
+ "esbuild"
189
+ ],
190
+ "//-overrides": "Transitive dev-only dependencies pinned forward to their patched releases so `pnpm audit` stays clean. None of these reach the published bundle — dist/ contains only src/ with the peer deps externalised. Keyed by major where several majors coexist in the tree. Drop an entry once every direct dependency has caught up on its own.",
191
+ "//-overrides-esbuild": "esbuild@0.27 is the second entry that crosses a 0.x major: GHSA-g7r4-m6w7-qqqr (arbitrary file read via the dev server on Windows) covers >=0.27.3 <0.28.1, and the 0.27 line has no patched release — the fix only exists from 0.28.1 onward. tsup 8.5.1 still declares esbuild ^0.27.0 and there is no later tsup, so the override is the only way forward; vite 8 already accepts ^0.27.0 || ^0.28.0, so only tsup is being held past its declared range. Verified against this combination: pnpm verify passes, which builds dist/ through tsup. Drop it once tsup declares ^0.28.",
192
+ "//-overrides-vite": "vite@5 is the other entry that crosses a major (see //-overrides-esbuild): vitepress 1.6.4 depends on vite ^5.4.14, and the fs.deny / path-traversal / launch-editor advisories are only fixed from 6.4.2 onward — the 5.x line ends at 5.4.21 with no patch. Verified against this combination: docs:dev serves, docs:build and docs:build:all both complete. Drop it for a plain vitepress bump as soon as vitepress 2 leaves alpha, since 2.x is on vite 6+ on its own.",
193
+ "overrides": {
194
+ "brace-expansion@2": "^2.1.4",
195
+ "esbuild@0.21": "^0.25.12",
196
+ "esbuild@0.27": "^0.28.1",
197
+ "form-data@4": "^4.0.6",
198
+ "js-yaml@4": "^4.3.1",
199
+ "nanoid@3": "^3.3.18",
200
+ "postcss@8": "^8.5.23",
201
+ "sharp": "^0.35.0",
202
+ "tmp": "^0.2.7",
203
+ "undici@6": "^6.27.0",
204
+ "undici@7": "^7.29.0",
205
+ "vite@5": "^6.4.3"
206
+ }
207
+ }
208
+ }
@@ -1,72 +1,72 @@
1
- /**
2
- * postinstall-disclaimer.mjs — print the "not a Beckhoff product" notice when
3
- * the package is installed as a dependency.
4
- *
5
- * The README carries the same disclaimer, but a README is only read by
6
- * whoever visits the npm page; this puts it in front of whoever runs the
7
- * install. Package managers make that best-effort rather than guaranteed:
8
- *
9
- * - npm 7+ hides a dependency's lifecycle output unless the install runs
10
- * with `--foreground-scripts`,
11
- * - pnpm 10+ blocks dependency lifecycle scripts entirely unless the
12
- * consumer allow-lists the package in `onlyBuiltDependencies`,
13
- * - any install can pass `--ignore-scripts`.
14
- *
15
- * So the notice is a bonus channel, never the only one — the README block and
16
- * the package description are what consumers are guaranteed to see.
17
- *
18
- * This file ships inside the published tarball (see `files` in package.json),
19
- * so it must stay dependency-free and must not import from `scripts/lib/`,
20
- * which is not published. It must also never fail an install: everything is
21
- * wrapped and the exit code is left untouched.
22
- */
23
-
24
- import { fileURLToPath } from 'node:url';
25
- import { sep } from 'node:path';
26
-
27
- const NOTICE = `
28
- beckhoff-xts-viewer-3d — independent open-source project, NOT a Beckhoff product.
29
-
30
- Not developed, endorsed, sponsored or supported by Beckhoff Automation
31
- GmbH & Co. KG or HepcoMotion, and not affiliated with either company.
32
- "Beckhoff", "XTS", "TwinCAT", "Hepco", "HepcoMotion" and "GFX" are their
33
- owners' trademarks, used here only to identify the hardware rendered.
34
- Geometry is derived from manufacturer CAD data; the MIT license covers this
35
- project's own code only. Provided "as is" as a visualization aid — not a
36
- safety device, not validated for machine control.
37
-
38
- Full disclaimer: https://github.com/philippleidig/beckhoff-xts-viewer-3d#readme
39
- `;
40
-
41
- /**
42
- * True when this copy lives inside a node_modules tree, i.e. it was installed
43
- * as somebody's dependency. Running `pnpm install` in this repository itself
44
- * would otherwise print the notice to the maintainer on every install.
45
- */
46
- function isInstalledAsDependency() {
47
- return fileURLToPath(import.meta.url).includes(`${sep}node_modules${sep}`);
48
- }
49
-
50
- /** Honour a quiet install: `npm install --silent`, `--loglevel error`, … */
51
- function isQuiet() {
52
- const level = process.env.npm_config_loglevel;
53
- return level === 'silent' || level === 'error' || level === 'warn';
54
- }
55
-
56
- function isMain() {
57
- return process.argv[1] === fileURLToPath(import.meta.url);
58
- }
59
-
60
- export function printDisclaimer() {
61
- if (!isInstalledAsDependency() || isQuiet()) return false;
62
- process.stdout.write(`${NOTICE}\n`);
63
- return true;
64
- }
65
-
66
- if (isMain()) {
67
- try {
68
- printDisclaimer();
69
- } catch {
70
- // A notice is never worth a failed install.
71
- }
72
- }
1
+ /**
2
+ * postinstall-disclaimer.mjs — print the "not a Beckhoff product" notice when
3
+ * the package is installed as a dependency.
4
+ *
5
+ * The README carries the same disclaimer, but a README is only read by
6
+ * whoever visits the npm page; this puts it in front of whoever runs the
7
+ * install. Package managers make that best-effort rather than guaranteed:
8
+ *
9
+ * - npm 7+ hides a dependency's lifecycle output unless the install runs
10
+ * with `--foreground-scripts`,
11
+ * - pnpm 10+ blocks dependency lifecycle scripts entirely unless the
12
+ * consumer allow-lists the package in `onlyBuiltDependencies`,
13
+ * - any install can pass `--ignore-scripts`.
14
+ *
15
+ * So the notice is a bonus channel, never the only one — the README block and
16
+ * the package description are what consumers are guaranteed to see.
17
+ *
18
+ * This file ships inside the published tarball (see `files` in package.json),
19
+ * so it must stay dependency-free and must not import from `scripts/lib/`,
20
+ * which is not published. It must also never fail an install: everything is
21
+ * wrapped and the exit code is left untouched.
22
+ */
23
+
24
+ import { fileURLToPath } from 'node:url';
25
+ import { sep } from 'node:path';
26
+
27
+ const NOTICE = `
28
+ beckhoff-xts-viewer-3d — independent open-source project, NOT a Beckhoff product.
29
+
30
+ Not developed, endorsed, sponsored or supported by Beckhoff Automation
31
+ GmbH & Co. KG or HepcoMotion, and not affiliated with either company.
32
+ "Beckhoff", "XTS", "TwinCAT", "Hepco", "HepcoMotion" and "GFX" are their
33
+ owners' trademarks, used here only to identify the hardware rendered.
34
+ Geometry is derived from manufacturer CAD data; the MIT license covers this
35
+ project's own code only. Provided "as is" as a visualization aid — not a
36
+ safety device, not validated for machine control.
37
+
38
+ Full disclaimer: https://github.com/philippleidig/beckhoff-xts-viewer-3d#readme
39
+ `;
40
+
41
+ /**
42
+ * True when this copy lives inside a node_modules tree, i.e. it was installed
43
+ * as somebody's dependency. Running `pnpm install` in this repository itself
44
+ * would otherwise print the notice to the maintainer on every install.
45
+ */
46
+ function isInstalledAsDependency() {
47
+ return fileURLToPath(import.meta.url).includes(`${sep}node_modules${sep}`);
48
+ }
49
+
50
+ /** Honour a quiet install: `npm install --silent`, `--loglevel error`, … */
51
+ function isQuiet() {
52
+ const level = process.env.npm_config_loglevel;
53
+ return level === 'silent' || level === 'error' || level === 'warn';
54
+ }
55
+
56
+ function isMain() {
57
+ return process.argv[1] === fileURLToPath(import.meta.url);
58
+ }
59
+
60
+ export function printDisclaimer() {
61
+ if (!isInstalledAsDependency() || isQuiet()) return false;
62
+ process.stdout.write(`${NOTICE}\n`);
63
+ return true;
64
+ }
65
+
66
+ if (isMain()) {
67
+ try {
68
+ printDisclaimer();
69
+ } catch {
70
+ // A notice is never worth a failed install.
71
+ }
72
+ }