@tscircuit/fake-snippets 0.0.143 → 0.0.145
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/bundle.js +19 -16
- package/dist/index.d.ts +2 -5
- package/dist/index.js +9 -3
- package/dist/schema.d.ts +0 -8
- package/dist/schema.js +0 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -747,7 +747,6 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
747
747
|
package_release_id: z.ZodString;
|
|
748
748
|
file_path: z.ZodString;
|
|
749
749
|
content_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
750
|
-
content_bytes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
751
750
|
created_at: z.ZodString;
|
|
752
751
|
content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
753
752
|
is_release_tarball: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -758,7 +757,6 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
758
757
|
file_path: string;
|
|
759
758
|
package_file_id: string;
|
|
760
759
|
content_text?: string | null | undefined;
|
|
761
|
-
content_bytes?: string | null | undefined;
|
|
762
760
|
content_mimetype?: string | null | undefined;
|
|
763
761
|
is_release_tarball?: boolean | undefined;
|
|
764
762
|
npm_pack_output?: any;
|
|
@@ -768,7 +766,6 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
768
766
|
file_path: string;
|
|
769
767
|
package_file_id: string;
|
|
770
768
|
content_text?: string | null | undefined;
|
|
771
|
-
content_bytes?: string | null | undefined;
|
|
772
769
|
content_mimetype?: string | null | undefined;
|
|
773
770
|
is_release_tarball?: boolean | undefined;
|
|
774
771
|
npm_pack_output?: any;
|
|
@@ -1223,7 +1220,6 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1223
1220
|
file_path: string;
|
|
1224
1221
|
package_file_id: string;
|
|
1225
1222
|
content_text?: string | null | undefined;
|
|
1226
|
-
content_bytes?: string | null | undefined;
|
|
1227
1223
|
content_mimetype?: string | null | undefined;
|
|
1228
1224
|
is_release_tarball?: boolean | undefined;
|
|
1229
1225
|
npm_pack_output?: any;
|
|
@@ -1649,6 +1645,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1649
1645
|
};
|
|
1650
1646
|
getOrgs: (filters?: {
|
|
1651
1647
|
owner_account_id?: string;
|
|
1648
|
+
account_id?: string;
|
|
1652
1649
|
github_handle?: string;
|
|
1653
1650
|
tscircuit_handle?: string;
|
|
1654
1651
|
name?: string;
|
|
@@ -1811,7 +1808,6 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1811
1808
|
file_path: string;
|
|
1812
1809
|
package_file_id: string;
|
|
1813
1810
|
content_text?: string | null | undefined;
|
|
1814
|
-
content_bytes?: string | null | undefined;
|
|
1815
1811
|
content_mimetype?: string | null | undefined;
|
|
1816
1812
|
is_release_tarball?: boolean | undefined;
|
|
1817
1813
|
npm_pack_output?: any;
|
|
@@ -2237,6 +2233,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
2237
2233
|
};
|
|
2238
2234
|
getOrgs: (filters?: {
|
|
2239
2235
|
owner_account_id?: string;
|
|
2236
|
+
account_id?: string;
|
|
2240
2237
|
github_handle?: string;
|
|
2241
2238
|
tscircuit_handle?: string;
|
|
2242
2239
|
name?: string;
|
package/dist/index.js
CHANGED
|
@@ -280,8 +280,6 @@ var packageFileSchema = z.object({
|
|
|
280
280
|
package_release_id: z.string(),
|
|
281
281
|
file_path: z.string(),
|
|
282
282
|
content_text: z.string().nullable().optional(),
|
|
283
|
-
content_bytes: z.string().nullable().optional(),
|
|
284
|
-
// Base64 encoded binary content for images/non-text files
|
|
285
283
|
created_at: z.string().datetime(),
|
|
286
284
|
content_mimetype: z.string().nullable().optional(),
|
|
287
285
|
is_release_tarball: z.boolean().optional(),
|
|
@@ -3868,13 +3866,21 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
|
|
|
3868
3866
|
return newOrganization;
|
|
3869
3867
|
},
|
|
3870
3868
|
getOrgs: (filters, auth) => {
|
|
3871
|
-
console.log(filters);
|
|
3872
3869
|
let orgs = get().organizations;
|
|
3873
3870
|
if (filters?.owner_account_id) {
|
|
3874
3871
|
orgs = orgs.filter(
|
|
3875
3872
|
(org) => org.owner_account_id === filters.owner_account_id
|
|
3876
3873
|
);
|
|
3877
3874
|
}
|
|
3875
|
+
if (filters?.account_id) {
|
|
3876
|
+
orgs = orgs.filter((org) => {
|
|
3877
|
+
const isMemberViaOrgAccounts = get().orgAccounts.some(
|
|
3878
|
+
(oa) => oa.org_id === org.org_id && oa.account_id === filters.account_id
|
|
3879
|
+
);
|
|
3880
|
+
const isPersonalOrg = org.is_personal_org && org.owner_account_id === filters.account_id;
|
|
3881
|
+
return isMemberViaOrgAccounts || isPersonalOrg;
|
|
3882
|
+
});
|
|
3883
|
+
}
|
|
3878
3884
|
if (filters?.github_handle) {
|
|
3879
3885
|
orgs = orgs.filter((org) => {
|
|
3880
3886
|
const account = get().accounts.find(
|
package/dist/schema.d.ts
CHANGED
|
@@ -964,7 +964,6 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
964
964
|
package_release_id: z.ZodString;
|
|
965
965
|
file_path: z.ZodString;
|
|
966
966
|
content_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
967
|
-
content_bytes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
968
967
|
created_at: z.ZodString;
|
|
969
968
|
content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
970
969
|
is_release_tarball: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -975,7 +974,6 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
975
974
|
file_path: string;
|
|
976
975
|
package_file_id: string;
|
|
977
976
|
content_text?: string | null | undefined;
|
|
978
|
-
content_bytes?: string | null | undefined;
|
|
979
977
|
content_mimetype?: string | null | undefined;
|
|
980
978
|
is_release_tarball?: boolean | undefined;
|
|
981
979
|
npm_pack_output?: any;
|
|
@@ -985,7 +983,6 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
985
983
|
file_path: string;
|
|
986
984
|
package_file_id: string;
|
|
987
985
|
content_text?: string | null | undefined;
|
|
988
|
-
content_bytes?: string | null | undefined;
|
|
989
986
|
content_mimetype?: string | null | undefined;
|
|
990
987
|
is_release_tarball?: boolean | undefined;
|
|
991
988
|
npm_pack_output?: any;
|
|
@@ -1661,7 +1658,6 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1661
1658
|
package_release_id: z.ZodString;
|
|
1662
1659
|
file_path: z.ZodString;
|
|
1663
1660
|
content_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1664
|
-
content_bytes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1665
1661
|
created_at: z.ZodString;
|
|
1666
1662
|
content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1667
1663
|
is_release_tarball: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1672,7 +1668,6 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1672
1668
|
file_path: string;
|
|
1673
1669
|
package_file_id: string;
|
|
1674
1670
|
content_text?: string | null | undefined;
|
|
1675
|
-
content_bytes?: string | null | undefined;
|
|
1676
1671
|
content_mimetype?: string | null | undefined;
|
|
1677
1672
|
is_release_tarball?: boolean | undefined;
|
|
1678
1673
|
npm_pack_output?: any;
|
|
@@ -1682,7 +1677,6 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1682
1677
|
file_path: string;
|
|
1683
1678
|
package_file_id: string;
|
|
1684
1679
|
content_text?: string | null | undefined;
|
|
1685
|
-
content_bytes?: string | null | undefined;
|
|
1686
1680
|
content_mimetype?: string | null | undefined;
|
|
1687
1681
|
is_release_tarball?: boolean | undefined;
|
|
1688
1682
|
npm_pack_output?: any;
|
|
@@ -2636,7 +2630,6 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2636
2630
|
file_path: string;
|
|
2637
2631
|
package_file_id: string;
|
|
2638
2632
|
content_text?: string | null | undefined;
|
|
2639
|
-
content_bytes?: string | null | undefined;
|
|
2640
2633
|
content_mimetype?: string | null | undefined;
|
|
2641
2634
|
is_release_tarball?: boolean | undefined;
|
|
2642
2635
|
npm_pack_output?: any;
|
|
@@ -3010,7 +3003,6 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
3010
3003
|
file_path: string;
|
|
3011
3004
|
package_file_id: string;
|
|
3012
3005
|
content_text?: string | null | undefined;
|
|
3013
|
-
content_bytes?: string | null | undefined;
|
|
3014
3006
|
content_mimetype?: string | null | undefined;
|
|
3015
3007
|
is_release_tarball?: boolean | undefined;
|
|
3016
3008
|
npm_pack_output?: any;
|
package/dist/schema.js
CHANGED
|
@@ -274,8 +274,6 @@ var packageFileSchema = z.object({
|
|
|
274
274
|
package_release_id: z.string(),
|
|
275
275
|
file_path: z.string(),
|
|
276
276
|
content_text: z.string().nullable().optional(),
|
|
277
|
-
content_bytes: z.string().nullable().optional(),
|
|
278
|
-
// Base64 encoded binary content for images/non-text files
|
|
279
277
|
created_at: z.string().datetime(),
|
|
280
278
|
content_mimetype: z.string().nullable().optional(),
|
|
281
279
|
is_release_tarball: z.boolean().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/fake-snippets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.145",
|
|
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.
|
|
87
|
+
"@tscircuit/eval": "^0.0.476",
|
|
88
88
|
"@tscircuit/layout": "^0.0.29",
|
|
89
89
|
"@tscircuit/mm": "^0.0.8",
|
|
90
90
|
"@tscircuit/pcb-viewer": "^1.11.256",
|