@shipfox/depcruise 1.0.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.
@@ -0,0 +1,2 @@
1
+ $ shipfox-swc
2
+ Successfully compiled: 1 file with swc (23.01ms)
package/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # @shipfox/depcruise
2
+
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2311e15: Moves the @shipfox tools packages to a dedicated repository — future versions will be published from there.
8
+ - Updated dependencies [2311e15]
9
+ - @shipfox/tool-utils@1.1.3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shipfox
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # @shipfox/depcruise
2
+
3
+ Workspace wrapper around Dependency Cruiser for Shipfox packages. It runs the project-local `depcruise` binary with the workspace dependency rules.
4
+
5
+ ## What it does
6
+
7
+ - **`shipfox-depcruise`**: Runs Dependency Cruiser against the current package.
8
+ - Uses the workspace `.dependency-cruiser.cjs` config.
9
+ - Uses the current package `tsconfig.json`.
10
+ - Resolves binaries and workspace files through `@shipfox/tool-utils`.
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ pnpm add -D @shipfox/depcruise
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ Add a script to `package.json`:
21
+
22
+ ```json
23
+ {
24
+ "scripts": {
25
+ "depcruise": "shipfox-depcruise"
26
+ }
27
+ }
28
+ ```
29
+
30
+ Then run:
31
+
32
+ ```bash
33
+ shipfox-depcruise
34
+ ```
35
+
36
+ The command checks imports for the package in the current working directory.
37
+
38
+ ## License
39
+
40
+ MIT
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ import '../dist/depcruise.js';
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import { execSync } from 'node:child_process';
3
+ import { buildShellCommand, getProjectBinaryPath, getWorkspaceFilePath } from '@shipfox/tool-utils';
4
+ const binPath = getProjectBinaryPath('depcruise', import.meta.url);
5
+ const configFile = getWorkspaceFilePath('.dependency-cruiser.cjs');
6
+ const command = buildShellCommand([
7
+ binPath,
8
+ '--config',
9
+ configFile,
10
+ '--ts-config',
11
+ 'tsconfig.json',
12
+ process.cwd()
13
+ ]);
14
+ execSync(command, {
15
+ stdio: 'inherit'
16
+ });
17
+
18
+ //# sourceMappingURL=depcruise.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/depcruise.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport {execSync} from 'node:child_process';\nimport {buildShellCommand, getProjectBinaryPath, getWorkspaceFilePath} from '@shipfox/tool-utils';\n\nconst binPath = getProjectBinaryPath('depcruise', import.meta.url);\nconst configFile = getWorkspaceFilePath('.dependency-cruiser.cjs');\n\nconst command = buildShellCommand([\n binPath,\n '--config',\n configFile,\n '--ts-config',\n 'tsconfig.json',\n process.cwd(),\n]);\n\nexecSync(command, {stdio: 'inherit'});\n"],"names":["execSync","buildShellCommand","getProjectBinaryPath","getWorkspaceFilePath","binPath","url","configFile","command","process","cwd","stdio"],"mappings":";AAEA,SAAQA,QAAQ,QAAO,qBAAqB;AAC5C,SAAQC,iBAAiB,EAAEC,oBAAoB,EAAEC,oBAAoB,QAAO,sBAAsB;AAElG,MAAMC,UAAUF,qBAAqB,aAAa,YAAYG,GAAG;AACjE,MAAMC,aAAaH,qBAAqB;AAExC,MAAMI,UAAUN,kBAAkB;IAChCG;IACA;IACAE;IACA;IACA;IACAE,QAAQC,GAAG;CACZ;AAEDT,SAASO,SAAS;IAACG,OAAO;AAAS"}
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@shipfox/depcruise",
3
+ "version": "1.0.1",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/ShipfoxHQ/platform.git",
7
+ "directory": "tools/depcruise"
8
+ },
9
+ "license": "MIT",
10
+ "private": false,
11
+ "type": "module",
12
+ "imports": {
13
+ "#*": "./src/*"
14
+ },
15
+ "bin": {
16
+ "shipfox-depcruise": "./bin/depcruise.js"
17
+ },
18
+ "dependencies": {
19
+ "dependency-cruiser": "^17.3.10",
20
+ "@shipfox/tool-utils": "1.1.3"
21
+ },
22
+ "devDependencies": {
23
+ "@types/node": "25.9.1",
24
+ "@shipfox/ts-config": "1.3.6",
25
+ "@shipfox/swc": "1.2.5",
26
+ "@shipfox/typescript": "1.1.5"
27
+ },
28
+ "scripts": {
29
+ "build": "shipfox-swc"
30
+ }
31
+ }
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {execSync} from 'node:child_process';
4
+ import {buildShellCommand, getProjectBinaryPath, getWorkspaceFilePath} from '@shipfox/tool-utils';
5
+
6
+ const binPath = getProjectBinaryPath('depcruise', import.meta.url);
7
+ const configFile = getWorkspaceFilePath('.dependency-cruiser.cjs');
8
+
9
+ const command = buildShellCommand([
10
+ binPath,
11
+ '--config',
12
+ configFile,
13
+ '--ts-config',
14
+ 'tsconfig.json',
15
+ process.cwd(),
16
+ ]);
17
+
18
+ execSync(command, {stdio: 'inherit'});
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@shipfox/ts-config/node",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist"
6
+ },
7
+ "include": ["src"],
8
+ "exclude": ["**/*.test.tsx", "**/*.test.ts"]
9
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "references": [{ "path": "tsconfig.build.json" }]
3
+ }