circuit-json-to-simple-3d 0.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.
- package/.github/workflows/bun-formatcheck.yml +26 -0
- package/.github/workflows/bun-pver-release.yml +28 -0
- package/.github/workflows/bun-test.yml +28 -0
- package/.github/workflows/bun-typecheck.yml +26 -0
- package/.github/workflows/dependency-check.yml +31 -0
- package/README.md +2 -0
- package/biome.json +53 -0
- package/bun.lock +469 -0
- package/bunfig.toml +2 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +71 -0
- package/lib/getDefaultCameraForPcbBoard.ts +17 -0
- package/lib/index.ts +71 -0
- package/lib/types.ts +0 -0
- package/package.json +23 -0
- package/tests/__snapshots__/svg.snap.svg +3 -0
- package/tests/__snapshots__/usb-c-flashlight.snap.svg +40 -0
- package/tests/assets/usb-c-flashlight.json +2881 -0
- package/tests/fixtures/preload.ts +1 -0
- package/tests/svg.test.ts +11 -0
- package/tests/usb-c-flashlight.test.ts +8 -0
- package/tsconfig.json +33 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
|
|
2
|
+
name: Format Check
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
format-check:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Setup bun
|
|
18
|
+
uses: oven-sh/setup-bun@v2
|
|
19
|
+
with:
|
|
20
|
+
bun-version: latest
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: bun install
|
|
24
|
+
|
|
25
|
+
- name: Run format check
|
|
26
|
+
run: bun run format:check
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
|
|
2
|
+
name: Publish to npm
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
with:
|
|
13
|
+
token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
14
|
+
- name: Setup bun
|
|
15
|
+
uses: oven-sh/setup-bun@v2
|
|
16
|
+
with:
|
|
17
|
+
bun-version: latest
|
|
18
|
+
- uses: actions/setup-node@v3
|
|
19
|
+
with:
|
|
20
|
+
node-version: 20
|
|
21
|
+
registry-url: https://registry.npmjs.org/
|
|
22
|
+
- run: npm install -g pver
|
|
23
|
+
- run: bun install --frozen-lockfile
|
|
24
|
+
- run: bun run build
|
|
25
|
+
- run: pver release
|
|
26
|
+
env:
|
|
27
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
28
|
+
GITHUB_TOKEN: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
|
|
2
|
+
name: Bun Test
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
timeout-minutes: 5
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout code
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Setup bun
|
|
20
|
+
uses: oven-sh/setup-bun@v2
|
|
21
|
+
with:
|
|
22
|
+
bun-version: latest
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: bun install
|
|
26
|
+
|
|
27
|
+
- name: Run tests
|
|
28
|
+
run: bun test
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
|
|
2
|
+
name: Type Check
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
type-check:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Setup bun
|
|
18
|
+
uses: oven-sh/setup-bun@v2
|
|
19
|
+
with:
|
|
20
|
+
bun-version: latest
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: bun i
|
|
24
|
+
|
|
25
|
+
- name: Run type check
|
|
26
|
+
run: bunx tsc --noEmit
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Dependency Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
dependency-check:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Setup bun
|
|
17
|
+
uses: oven-sh/setup-bun@v2
|
|
18
|
+
with:
|
|
19
|
+
bun-version: latest
|
|
20
|
+
|
|
21
|
+
- name: Run Dependency Check
|
|
22
|
+
run: bunx @tscircuit/dependency-check
|
|
23
|
+
env:
|
|
24
|
+
# You should usually use internal_lib
|
|
25
|
+
# Other options:
|
|
26
|
+
# - bundled_lib: No peer dependencies, no dependencies
|
|
27
|
+
INPUT_PACKAGE_TYPE: internal_lib
|
|
28
|
+
|
|
29
|
+
# INPUT_PEER_DEPS_SHOULD_BE_ASTERISK: false
|
|
30
|
+
# INPUT_IGNORE_PACKAGES: "circuit-json,..."
|
|
31
|
+
# INPUT_ADDITIONAL_INTERNAL_PACKAGES: "circuit-json,..."
|
package/README.md
ADDED
package/biome.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json",
|
|
3
|
+
"organizeImports": {
|
|
4
|
+
"enabled": true
|
|
5
|
+
},
|
|
6
|
+
"formatter": {
|
|
7
|
+
"enabled": true,
|
|
8
|
+
"indentStyle": "space"
|
|
9
|
+
},
|
|
10
|
+
"files": {
|
|
11
|
+
"ignore": ["cosmos-export", "dist", "package.json"]
|
|
12
|
+
},
|
|
13
|
+
"javascript": {
|
|
14
|
+
"formatter": {
|
|
15
|
+
"jsxQuoteStyle": "double",
|
|
16
|
+
"quoteProperties": "asNeeded",
|
|
17
|
+
"trailingCommas": "all",
|
|
18
|
+
"semicolons": "asNeeded",
|
|
19
|
+
"arrowParentheses": "always",
|
|
20
|
+
"bracketSpacing": true,
|
|
21
|
+
"bracketSameLine": false
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"linter": {
|
|
25
|
+
"enabled": true,
|
|
26
|
+
"rules": {
|
|
27
|
+
"recommended": true,
|
|
28
|
+
"suspicious": {
|
|
29
|
+
"noExplicitAny": "off"
|
|
30
|
+
},
|
|
31
|
+
"complexity": {
|
|
32
|
+
"noForEach": "error",
|
|
33
|
+
"useLiteralKeys": "off"
|
|
34
|
+
},
|
|
35
|
+
"style": {
|
|
36
|
+
"useSingleVarDeclarator": "error",
|
|
37
|
+
"noParameterAssign": "off",
|
|
38
|
+
"noUselessElse": "off",
|
|
39
|
+
"noNonNullAssertion": "off",
|
|
40
|
+
"useNumberNamespace": "off",
|
|
41
|
+
"noUnusedTemplateLiteral": "off",
|
|
42
|
+
"useFilenamingConvention": {
|
|
43
|
+
"level": "error",
|
|
44
|
+
"options": {
|
|
45
|
+
"strictCase": true,
|
|
46
|
+
"requireAscii": true,
|
|
47
|
+
"filenameCases": ["kebab-case", "export"]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|