@tscircuit/fake-snippets 0.0.148 → 0.0.149

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/index.d.ts CHANGED
@@ -1069,7 +1069,6 @@ declare const orgSchema: z.ZodObject<{
1069
1069
  org_display_name: z.ZodOptional<z.ZodString>;
1070
1070
  github_handle: z.ZodNullable<z.ZodString>;
1071
1071
  tscircuit_handle: z.ZodNullable<z.ZodString>;
1072
- org_name: z.ZodString;
1073
1072
  }, "strip", z.ZodTypeAny, {
1074
1073
  created_at: string;
1075
1074
  tscircuit_handle: string | null;
@@ -1077,7 +1076,6 @@ declare const orgSchema: z.ZodObject<{
1077
1076
  owner_account_id: string;
1078
1077
  is_personal_org: boolean;
1079
1078
  github_handle: string | null;
1080
- org_name: string;
1081
1079
  org_display_name?: string | undefined;
1082
1080
  }, {
1083
1081
  created_at: string;
@@ -1085,7 +1083,6 @@ declare const orgSchema: z.ZodObject<{
1085
1083
  org_id: string;
1086
1084
  owner_account_id: string;
1087
1085
  github_handle: string | null;
1088
- org_name: string;
1089
1086
  is_personal_org?: boolean | undefined;
1090
1087
  org_display_name?: string | undefined;
1091
1088
  }>;
@@ -1319,7 +1316,6 @@ declare const createDatabase: ({ seed }?: {
1319
1316
  owner_account_id: string;
1320
1317
  is_personal_org: boolean;
1321
1318
  github_handle: string | null;
1322
- org_name: string;
1323
1319
  org_display_name?: string | undefined;
1324
1320
  }[];
1325
1321
  orgAccounts: {
@@ -1626,7 +1622,7 @@ declare const createDatabase: ({ seed }?: {
1626
1622
  getPackageBuildsByReleaseId: (packageReleaseId: string) => PackageBuild[];
1627
1623
  updatePackageBuild: (packageBuildId: string, updates: Partial<PackageBuild>) => PackageBuild | undefined;
1628
1624
  addOrganization: (organization: {
1629
- name: string;
1625
+ name?: string;
1630
1626
  org_id?: string;
1631
1627
  is_personal_org?: boolean;
1632
1628
  owner_account_id: string;
@@ -1640,7 +1636,6 @@ declare const createDatabase: ({ seed }?: {
1640
1636
  owner_account_id: string;
1641
1637
  is_personal_org: boolean;
1642
1638
  github_handle: string | null;
1643
- org_name: string;
1644
1639
  org_display_name?: string | undefined;
1645
1640
  };
1646
1641
  getOrgs: (filters?: {
@@ -1661,12 +1656,10 @@ declare const createDatabase: ({ seed }?: {
1661
1656
  owner_account_id: string;
1662
1657
  is_personal_org: boolean;
1663
1658
  github_handle: string | null;
1664
- org_name: string;
1665
1659
  org_display_name?: string | undefined;
1666
1660
  }[];
1667
1661
  getOrg: (filters: {
1668
1662
  org_id?: string;
1669
- org_name?: string;
1670
1663
  github_handle?: string;
1671
1664
  tscircuit_handle?: string;
1672
1665
  }, auth?: {
@@ -1681,7 +1674,6 @@ declare const createDatabase: ({ seed }?: {
1681
1674
  owner_account_id: string;
1682
1675
  is_personal_org: boolean;
1683
1676
  github_handle: string | null;
1684
- org_name: string;
1685
1677
  org_display_name?: string | undefined;
1686
1678
  } | null;
1687
1679
  addOrganizationAccount: (organizationAccount: {
@@ -1907,7 +1899,6 @@ declare const createDatabase: ({ seed }?: {
1907
1899
  owner_account_id: string;
1908
1900
  is_personal_org: boolean;
1909
1901
  github_handle: string | null;
1910
- org_name: string;
1911
1902
  org_display_name?: string | undefined;
1912
1903
  }[];
1913
1904
  orgAccounts: {
@@ -2214,7 +2205,7 @@ declare const createDatabase: ({ seed }?: {
2214
2205
  getPackageBuildsByReleaseId: (packageReleaseId: string) => PackageBuild[];
2215
2206
  updatePackageBuild: (packageBuildId: string, updates: Partial<PackageBuild>) => PackageBuild | undefined;
2216
2207
  addOrganization: (organization: {
2217
- name: string;
2208
+ name?: string;
2218
2209
  org_id?: string;
2219
2210
  is_personal_org?: boolean;
2220
2211
  owner_account_id: string;
@@ -2228,7 +2219,6 @@ declare const createDatabase: ({ seed }?: {
2228
2219
  owner_account_id: string;
2229
2220
  is_personal_org: boolean;
2230
2221
  github_handle: string | null;
2231
- org_name: string;
2232
2222
  org_display_name?: string | undefined;
2233
2223
  };
2234
2224
  getOrgs: (filters?: {
@@ -2249,12 +2239,10 @@ declare const createDatabase: ({ seed }?: {
2249
2239
  owner_account_id: string;
2250
2240
  is_personal_org: boolean;
2251
2241
  github_handle: string | null;
2252
- org_name: string;
2253
2242
  org_display_name?: string | undefined;
2254
2243
  }[];
2255
2244
  getOrg: (filters: {
2256
2245
  org_id?: string;
2257
- org_name?: string;
2258
2246
  github_handle?: string;
2259
2247
  tscircuit_handle?: string;
2260
2248
  }, auth?: {
@@ -2269,7 +2257,6 @@ declare const createDatabase: ({ seed }?: {
2269
2257
  owner_account_id: string;
2270
2258
  is_personal_org: boolean;
2271
2259
  github_handle: string | null;
2272
- org_name: string;
2273
2260
  org_display_name?: string | undefined;
2274
2261
  } | null;
2275
2262
  addOrganizationAccount: (organizationAccount: {
package/dist/index.js CHANGED
@@ -390,8 +390,7 @@ var orgSchema = z.object({
390
390
  created_at: z.string().datetime(),
391
391
  org_display_name: z.string().optional(),
392
392
  github_handle: z.string().nullable(),
393
- tscircuit_handle: z.string().nullable(),
394
- org_name: z.string()
393
+ tscircuit_handle: z.string().nullable()
395
394
  });
396
395
  var orgAccountSchema = z.object({
397
396
  org_account_id: z.string(),
@@ -445,9 +444,9 @@ var databaseSchema = z.object({
445
444
  bugReports: z.array(bugReportSchema).default([]),
446
445
  bugReportFiles: z.array(bugReportFileSchema).default([])
447
446
  });
448
- var tscircuitHandleSchema = z.string().min(1).max(40).regex(
449
- /^[0-9A-Za-z_-]+$/,
450
- "tscircuit_handle may only contain letters, numbers, underscores, and hyphens"
447
+ var tscircuitHandleSchema = z.string().min(5).max(40).regex(
448
+ /^[0-9A-Za-z][0-9A-Za-z_-]*[0-9A-Za-z]$/,
449
+ "tscircuit_handle must start and end with a letter or number, and may only contain letters, numbers, underscores, and hyphens"
451
450
  );
452
451
 
453
452
  // fake-snippets-api/lib/db/autoload-dev-packages.ts
@@ -2475,7 +2474,7 @@ export const SquareWaveModule = () => (
2475
2474
  });
2476
2475
  const testOrg = db.addOrganization({
2477
2476
  org_display_name: "Test Organization",
2478
- name: "test-organization",
2477
+ tscircuit_handle: "test-organization",
2479
2478
  github_handle: "tscircuit",
2480
2479
  owner_account_id: account_id
2481
2480
  });
@@ -3846,13 +3845,12 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
3846
3845
  },
3847
3846
  addOrganization: (organization) => {
3848
3847
  const newOrganization = {
3849
- org_name: organization.name,
3850
3848
  org_id: organization.org_id || `org_${get().idCounter + 1}`,
3851
3849
  github_handle: organization.github_handle ?? null,
3852
3850
  is_personal_org: organization.is_personal_org || false,
3853
3851
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
3854
- org_display_name: organization.org_display_name ?? organization.name,
3855
- tscircuit_handle: organization.tscircuit_handle || organization.name,
3852
+ org_display_name: organization.org_display_name ?? organization.tscircuit_handle ?? void 0,
3853
+ tscircuit_handle: organization.tscircuit_handle || organization.name || null,
3856
3854
  ...organization
3857
3855
  };
3858
3856
  set((state) => ({
@@ -3927,9 +3925,6 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
3927
3925
  if (filters?.org_id) {
3928
3926
  orgs = orgs.filter((org2) => org2.org_id === filters.org_id);
3929
3927
  }
3930
- if (filters?.org_name) {
3931
- orgs = orgs.filter((org2) => org2.org_name === filters.org_name);
3932
- }
3933
3928
  if (filters?.github_handle) {
3934
3929
  orgs = orgs.filter((org2) => org2.github_handle === filters.github_handle);
3935
3930
  }
package/dist/schema.d.ts CHANGED
@@ -1286,7 +1286,6 @@ declare const orgSchema: z.ZodObject<{
1286
1286
  org_display_name: z.ZodOptional<z.ZodString>;
1287
1287
  github_handle: z.ZodNullable<z.ZodString>;
1288
1288
  tscircuit_handle: z.ZodNullable<z.ZodString>;
1289
- org_name: z.ZodString;
1290
1289
  }, "strip", z.ZodTypeAny, {
1291
1290
  created_at: string;
1292
1291
  tscircuit_handle: string | null;
@@ -1294,7 +1293,6 @@ declare const orgSchema: z.ZodObject<{
1294
1293
  owner_account_id: string;
1295
1294
  is_personal_org: boolean;
1296
1295
  github_handle: string | null;
1297
- org_name: string;
1298
1296
  org_display_name?: string | undefined;
1299
1297
  }, {
1300
1298
  created_at: string;
@@ -1302,7 +1300,6 @@ declare const orgSchema: z.ZodObject<{
1302
1300
  org_id: string;
1303
1301
  owner_account_id: string;
1304
1302
  github_handle: string | null;
1305
- org_name: string;
1306
1303
  is_personal_org?: boolean | undefined;
1307
1304
  org_display_name?: string | undefined;
1308
1305
  }>;
@@ -1971,7 +1968,6 @@ declare const databaseSchema: z.ZodObject<{
1971
1968
  org_display_name: z.ZodOptional<z.ZodString>;
1972
1969
  github_handle: z.ZodNullable<z.ZodString>;
1973
1970
  tscircuit_handle: z.ZodNullable<z.ZodString>;
1974
- org_name: z.ZodString;
1975
1971
  }, "strip", z.ZodTypeAny, {
1976
1972
  created_at: string;
1977
1973
  tscircuit_handle: string | null;
@@ -1979,7 +1975,6 @@ declare const databaseSchema: z.ZodObject<{
1979
1975
  owner_account_id: string;
1980
1976
  is_personal_org: boolean;
1981
1977
  github_handle: string | null;
1982
- org_name: string;
1983
1978
  org_display_name?: string | undefined;
1984
1979
  }, {
1985
1980
  created_at: string;
@@ -1987,7 +1982,6 @@ declare const databaseSchema: z.ZodObject<{
1987
1982
  org_id: string;
1988
1983
  owner_account_id: string;
1989
1984
  github_handle: string | null;
1990
- org_name: string;
1991
1985
  is_personal_org?: boolean | undefined;
1992
1986
  org_display_name?: string | undefined;
1993
1987
  }>, "many">>;
@@ -2729,7 +2723,6 @@ declare const databaseSchema: z.ZodObject<{
2729
2723
  owner_account_id: string;
2730
2724
  is_personal_org: boolean;
2731
2725
  github_handle: string | null;
2732
- org_name: string;
2733
2726
  org_display_name?: string | undefined;
2734
2727
  }[];
2735
2728
  orgAccounts: {
@@ -3101,7 +3094,6 @@ declare const databaseSchema: z.ZodObject<{
3101
3094
  org_id: string;
3102
3095
  owner_account_id: string;
3103
3096
  github_handle: string | null;
3104
- org_name: string;
3105
3097
  is_personal_org?: boolean | undefined;
3106
3098
  org_display_name?: string | undefined;
3107
3099
  }[] | undefined;
package/dist/schema.js CHANGED
@@ -384,8 +384,7 @@ var orgSchema = z.object({
384
384
  created_at: z.string().datetime(),
385
385
  org_display_name: z.string().optional(),
386
386
  github_handle: z.string().nullable(),
387
- tscircuit_handle: z.string().nullable(),
388
- org_name: z.string()
387
+ tscircuit_handle: z.string().nullable()
389
388
  });
390
389
  var orgAccountSchema = z.object({
391
390
  org_account_id: z.string(),
@@ -439,9 +438,9 @@ var databaseSchema = z.object({
439
438
  bugReports: z.array(bugReportSchema).default([]),
440
439
  bugReportFiles: z.array(bugReportFileSchema).default([])
441
440
  });
442
- var tscircuitHandleSchema = z.string().min(1).max(40).regex(
443
- /^[0-9A-Za-z_-]+$/,
444
- "tscircuit_handle may only contain letters, numbers, underscores, and hyphens"
441
+ var tscircuitHandleSchema = z.string().min(5).max(40).regex(
442
+ /^[0-9A-Za-z][0-9A-Za-z_-]*[0-9A-Za-z]$/,
443
+ "tscircuit_handle must start and end with a letter or number, and may only contain letters, numbers, underscores, and hyphens"
445
444
  );
446
445
  export {
447
446
  accountPackageSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/fake-snippets",
3
- "version": "0.0.148",
3
+ "version": "0.0.149",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -84,7 +84,7 @@
84
84
  "@tscircuit/3d-viewer": "^0.0.435",
85
85
  "@tscircuit/assembly-viewer": "^0.0.5",
86
86
  "@tscircuit/create-snippet-url": "^0.0.8",
87
- "@tscircuit/eval": "^0.0.476",
87
+ "@tscircuit/eval": "^0.0.479",
88
88
  "@tscircuit/layout": "^0.0.29",
89
89
  "@tscircuit/mm": "^0.0.8",
90
90
  "@tscircuit/pcb-viewer": "^1.11.256",