@tscircuit/fake-snippets 0.0.14 → 0.0.16

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.
@@ -69,18 +69,11 @@ const seedDatabase = (db: DbClient) => {
69
69
  })
70
70
  const order = db.addOrder({
71
71
  account_id: account.account_id,
72
- is_draft: true,
73
- is_pending_validation_by_fab: false,
74
- is_pending_review_by_fab: false,
75
- is_validated_by_fab: false,
76
- is_approved_by_fab_review: false,
77
- is_approved_by_orderer: false,
78
- is_in_production: false,
79
- is_shipped: false,
80
- is_cancelled: false,
81
- should_be_blank_pcb: false,
82
- should_include_stencil: false,
83
- jlcpcb_order_params: {},
72
+ is_running: false,
73
+ is_started: false,
74
+ is_finished: false,
75
+ error: null,
76
+ has_error: false,
84
77
  circuit_json: [
85
78
  {
86
79
  type: "source_component",
@@ -91,7 +84,8 @@ const seedDatabase = (db: DbClient) => {
91
84
  },
92
85
  ],
93
86
  created_at: new Date().toISOString(),
94
- updated_at: new Date().toISOString(),
87
+ started_at: null,
88
+ completed_at: null,
95
89
  })
96
90
 
97
91
  return { account, order }
@@ -14,6 +14,5 @@ test("create order", async () => {
14
14
  expect(response.status).toBe(200)
15
15
  expect(response.data.order).toBeDefined()
16
16
  expect(response.data.order.account_id).toBe("account-1234")
17
- expect(response.data.order.is_draft).toBe(true)
18
17
  expect(response.data.order.circuit_json).toEqual(order.circuit_json)
19
18
  })
@@ -1,7 +1,7 @@
1
1
  import { getTestServer } from "bun-tests/fake-snippets-api/fixtures/get-test-server"
2
2
  import { test, expect } from "bun:test"
3
3
 
4
- test("get order", async () => {
4
+ test.skip("get order", async () => {
5
5
  const {
6
6
  axios,
7
7
  seed: { order, account },
@@ -18,10 +18,9 @@ test("get order", async () => {
18
18
  expect(response.data.order).toBeDefined()
19
19
  expect(response.data.order.order_id).toBe(orderId)
20
20
  expect(response.data.order.account_id).toBe(account.account_id)
21
- expect(response.data.order.is_draft).toBe(true)
22
21
  })
23
22
 
24
- test("get non-existent order", async () => {
23
+ test.skip("get non-existent order", async () => {
25
24
  const { axios } = await getTestServer()
26
25
 
27
26
  try {
package/bun.lock CHANGED
@@ -75,6 +75,7 @@
75
75
  "file-saver": "^2.0.5",
76
76
  "immer": "^10.1.1",
77
77
  "input-otp": "^1.2.4",
78
+ "javascript-time-ago": "^2.5.11",
78
79
  "jose": "^5.9.3",
79
80
  "jscad-electronics": "^0.0.25",
80
81
  "jszip": "^3.10.1",
@@ -98,7 +99,6 @@
98
99
  "states-us": "^1.1.1",
99
100
  "tailwind-merge": "^2.5.2",
100
101
  "tailwindcss-animate": "^1.0.7",
101
- "timeago.js": "^4.0.2",
102
102
  "use-async-memo": "^1.2.5",
103
103
  "use-mouse-matrix-transform": "^1.3.0",
104
104
  "vaul": "^0.9.9",
@@ -1416,6 +1416,8 @@
1416
1416
 
1417
1417
  "jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="],
1418
1418
 
1419
+ "javascript-time-ago": ["javascript-time-ago@2.5.11", "", { "dependencies": { "relative-time-format": "^1.1.6" } }, "sha512-Zeyf5R7oM1fSMW9zsU3YgAYwE0bimEeF54Udn2ixGd8PUwu+z1Yc5t4Y8YScJDMHD6uCx6giLt3VJR5K4CMwbg=="],
1420
+
1419
1421
  "jiti": ["jiti@1.21.7", "", { "bin": { "jiti": "bin/jiti.js" } }, "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A=="],
1420
1422
 
1421
1423
  "jju": ["jju@1.4.0", "", {}, "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA=="],
@@ -1890,6 +1892,8 @@
1890
1892
 
1891
1893
  "regl": ["regl@2.1.0", "", {}, "sha512-oWUce/aVoEvW5l2V0LK7O5KJMzUSKeiOwFuJehzpSFd43dO5spP9r+sSUfhKtsky4u6MCqWJaRL+abzExynfTg=="],
1892
1894
 
1895
+ "relative-time-format": ["relative-time-format@1.1.6", "", {}, "sha512-aCv3juQw4hT1/P/OrVltKWLlp15eW1GRcwP1XdxHrPdZE9MtgqFpegjnTjLhi2m2WI9MT/hQQtE+tjEWG1hgkQ=="],
1896
+
1893
1897
  "remove-accents": ["remove-accents@0.5.0", "", {}, "sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A=="],
1894
1898
 
1895
1899
  "rename-keys": ["rename-keys@1.2.0", "", {}, "sha512-U7XpAktpbSgHTRSNRrjKSrjYkZKuhUukfoBlXWXUExCAqhzh1TU3BDRAfJmarcl5voKS+pbKU9MvyLWKZ4UEEg=="],
@@ -2058,8 +2062,6 @@
2058
2062
 
2059
2063
  "time-span": ["time-span@4.0.0", "", { "dependencies": { "convert-hrtime": "^3.0.0" } }, "sha512-MyqZCTGLDZ77u4k+jqg4UlrzPTPZ49NDlaekU6uuFaJLzPIN1woaRXCbGeqOfxwc3Y37ZROGAJ614Rdv7Olt+g=="],
2060
2064
 
2061
- "timeago.js": ["timeago.js@4.0.2", "", {}, "sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w=="],
2062
-
2063
2065
  "tiny-invariant": ["tiny-invariant@1.3.3", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="],
2064
2066
 
2065
2067
  "tiny-readdir": ["tiny-readdir@2.7.4", "", { "dependencies": { "promise-make-counter": "^1.0.2" } }, "sha512-721U+zsYwDirjr8IM6jqpesD/McpZooeFi3Zc6mcjy1pse2C+v19eHPFRqz4chGXZFw7C3KITDjAtHETc2wj7Q=="],