@tscircuit/fake-snippets 0.0.162 → 0.0.164
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 +128 -13
- package/dist/index.d.ts +8 -3
- package/dist/index.js +124 -10
- package/dist/schema.d.ts +41 -3
- package/dist/schema.js +6 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -747,8 +747,9 @@ 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
|
-
|
|
750
|
+
content_bytes: z.ZodOptional<z.ZodNullable<z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>>;
|
|
751
751
|
content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
752
|
+
created_at: z.ZodString;
|
|
752
753
|
is_release_tarball: z.ZodOptional<z.ZodBoolean>;
|
|
753
754
|
npm_pack_output: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
754
755
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -757,6 +758,7 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
757
758
|
file_path: string;
|
|
758
759
|
package_file_id: string;
|
|
759
760
|
content_text?: string | null | undefined;
|
|
761
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
760
762
|
content_mimetype?: string | null | undefined;
|
|
761
763
|
is_release_tarball?: boolean | undefined;
|
|
762
764
|
npm_pack_output?: any;
|
|
@@ -766,6 +768,7 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
766
768
|
file_path: string;
|
|
767
769
|
package_file_id: string;
|
|
768
770
|
content_text?: string | null | undefined;
|
|
771
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
769
772
|
content_mimetype?: string | null | undefined;
|
|
770
773
|
is_release_tarball?: boolean | undefined;
|
|
771
774
|
npm_pack_output?: any;
|
|
@@ -1285,6 +1288,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1285
1288
|
file_path: string;
|
|
1286
1289
|
package_file_id: string;
|
|
1287
1290
|
content_text?: string | null | undefined;
|
|
1291
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
1288
1292
|
content_mimetype?: string | null | undefined;
|
|
1289
1293
|
is_release_tarball?: boolean | undefined;
|
|
1290
1294
|
npm_pack_output?: any;
|
|
@@ -1661,7 +1665,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1661
1665
|
github_username: string;
|
|
1662
1666
|
}) => Snippet | undefined;
|
|
1663
1667
|
searchSnippets: (query: string) => Snippet[];
|
|
1664
|
-
searchPackages: (query: string) => Package[];
|
|
1668
|
+
searchPackages: (query: string, account_id?: string) => Package[];
|
|
1665
1669
|
searchAccounts: (query: string, limit?: number) => Account[];
|
|
1666
1670
|
deleteSnippet: (snippetId: string) => boolean;
|
|
1667
1671
|
addSession: (session: Omit<Session, "session_id">) => Session;
|
|
@@ -1906,6 +1910,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1906
1910
|
file_path: string;
|
|
1907
1911
|
package_file_id: string;
|
|
1908
1912
|
content_text?: string | null | undefined;
|
|
1913
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
1909
1914
|
content_mimetype?: string | null | undefined;
|
|
1910
1915
|
is_release_tarball?: boolean | undefined;
|
|
1911
1916
|
npm_pack_output?: any;
|
|
@@ -2282,7 +2287,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
2282
2287
|
github_username: string;
|
|
2283
2288
|
}) => Snippet | undefined;
|
|
2284
2289
|
searchSnippets: (query: string) => Snippet[];
|
|
2285
|
-
searchPackages: (query: string) => Package[];
|
|
2290
|
+
searchPackages: (query: string, account_id?: string) => Package[];
|
|
2286
2291
|
searchAccounts: (query: string, limit?: number) => Account[];
|
|
2287
2292
|
deleteSnippet: (snippetId: string) => boolean;
|
|
2288
2293
|
addSession: (session: Omit<Session, "session_id">) => Session;
|
package/dist/index.js
CHANGED
|
@@ -281,11 +281,15 @@ var packageFileSchema = z.object({
|
|
|
281
281
|
package_release_id: z.string(),
|
|
282
282
|
file_path: z.string(),
|
|
283
283
|
content_text: z.string().nullable().optional(),
|
|
284
|
-
|
|
284
|
+
content_bytes: z.instanceof(Buffer).nullable().optional(),
|
|
285
285
|
content_mimetype: z.string().nullable().optional(),
|
|
286
|
+
created_at: z.string().datetime(),
|
|
286
287
|
is_release_tarball: z.boolean().optional(),
|
|
287
288
|
npm_pack_output: z.any().nullable().optional()
|
|
288
289
|
});
|
|
290
|
+
var packageFileLiteSchema = packageFileSchema.omit({
|
|
291
|
+
content_text: true
|
|
292
|
+
});
|
|
289
293
|
var packageSchema = z.object({
|
|
290
294
|
package_id: z.string(),
|
|
291
295
|
creator_account_id: z.string(),
|
|
@@ -475,6 +479,11 @@ var tscircuitHandleSchema = z.string().min(1).max(40).regex(
|
|
|
475
479
|
"tscircuit_handle must start and end with a letter or number, and may only contain letters, numbers, underscores, and hyphens"
|
|
476
480
|
);
|
|
477
481
|
|
|
482
|
+
// fake-snippets-api/lib/db/seed.ts
|
|
483
|
+
import { readFileSync } from "fs";
|
|
484
|
+
import { join, dirname } from "path";
|
|
485
|
+
import { fileURLToPath } from "url";
|
|
486
|
+
|
|
478
487
|
// fake-snippets-api/lib/db/autoload-dev-packages.ts
|
|
479
488
|
import fs from "fs";
|
|
480
489
|
import path from "path";
|
|
@@ -659,6 +668,7 @@ var loadAutoloadPackages = async (db) => {
|
|
|
659
668
|
};
|
|
660
669
|
|
|
661
670
|
// fake-snippets-api/lib/db/seed.ts
|
|
671
|
+
var __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
662
672
|
var seed = (db) => {
|
|
663
673
|
const { account_id } = db.addAccount({
|
|
664
674
|
account_id: "account-1234",
|
|
@@ -2734,6 +2744,100 @@ exports.TestComponent = TestComponent;
|
|
|
2734
2744
|
org_id: testOrg.org_id,
|
|
2735
2745
|
account_id: seveibarAcc.account_id
|
|
2736
2746
|
});
|
|
2747
|
+
const glbModelPackage = db.addPackage({
|
|
2748
|
+
name: "testuser/custom-3d-model",
|
|
2749
|
+
unscoped_name: "custom-3d-model",
|
|
2750
|
+
creator_account_id: account_id,
|
|
2751
|
+
owner_org_id: "org-1234",
|
|
2752
|
+
owner_github_username: "testuser",
|
|
2753
|
+
description: "A package demonstrating custom 3D CAD model usage",
|
|
2754
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2755
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2756
|
+
is_source_from_github: false,
|
|
2757
|
+
snippet_type: "package",
|
|
2758
|
+
latest_package_release_id: null,
|
|
2759
|
+
latest_version: "0.0.1",
|
|
2760
|
+
license: "MIT",
|
|
2761
|
+
website: "https://tscircuit.com",
|
|
2762
|
+
star_count: 5,
|
|
2763
|
+
ai_description: "A package that demonstrates how to use custom 3D CAD models (GLB files) with tscircuit components.",
|
|
2764
|
+
ai_usage_instructions: "Import the default component and use it in your circuit design. The component includes a custom 3D model for visualization.",
|
|
2765
|
+
default_view: "3d"
|
|
2766
|
+
});
|
|
2767
|
+
const { package_release_id: glbModelReleaseId } = db.addPackageRelease({
|
|
2768
|
+
package_id: glbModelPackage.package_id,
|
|
2769
|
+
version: "0.0.1",
|
|
2770
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2771
|
+
is_latest: true,
|
|
2772
|
+
is_locked: false,
|
|
2773
|
+
has_transpiled: true,
|
|
2774
|
+
transpilation_error: null
|
|
2775
|
+
});
|
|
2776
|
+
db.updatePackage(glbModelPackage.package_id, {
|
|
2777
|
+
latest_package_release_id: glbModelReleaseId
|
|
2778
|
+
});
|
|
2779
|
+
db.addPackageFile({
|
|
2780
|
+
package_release_id: glbModelReleaseId,
|
|
2781
|
+
file_path: "index.tsx",
|
|
2782
|
+
content_text: `import glbUrl from "./test.glb"
|
|
2783
|
+
export default () => (
|
|
2784
|
+
<board>
|
|
2785
|
+
<chip
|
|
2786
|
+
name="U1"
|
|
2787
|
+
cadModel={
|
|
2788
|
+
<cadassembly>
|
|
2789
|
+
<cadmodel
|
|
2790
|
+
modelUrl={glbUrl}
|
|
2791
|
+
modelUnitToMmScale={1000}
|
|
2792
|
+
positionOffset={{ x: 0, y: 0, z: 0.2 }}
|
|
2793
|
+
/>
|
|
2794
|
+
</cadassembly>
|
|
2795
|
+
}
|
|
2796
|
+
/>
|
|
2797
|
+
</board>
|
|
2798
|
+
)`,
|
|
2799
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
2800
|
+
});
|
|
2801
|
+
const glbFilePath = join(__dirname2, "assets", "test.glb");
|
|
2802
|
+
const glbFileContent = readFileSync(glbFilePath);
|
|
2803
|
+
db.addPackageFile({
|
|
2804
|
+
package_release_id: glbModelReleaseId,
|
|
2805
|
+
file_path: "test.glb",
|
|
2806
|
+
content_bytes: glbFileContent,
|
|
2807
|
+
content_mimetype: "model/gltf-binary",
|
|
2808
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
2809
|
+
});
|
|
2810
|
+
db.addPackageBuild({
|
|
2811
|
+
package_release_id: glbModelReleaseId,
|
|
2812
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2813
|
+
transpilation_in_progress: false,
|
|
2814
|
+
transpilation_started_at: new Date(Date.now() - 5e3).toISOString(),
|
|
2815
|
+
transpilation_completed_at: new Date(Date.now() - 3e3).toISOString(),
|
|
2816
|
+
transpilation_logs: [
|
|
2817
|
+
"[INFO] Starting transpilation...",
|
|
2818
|
+
"[INFO] Parsing package code",
|
|
2819
|
+
"[INFO] Processing GLB asset file",
|
|
2820
|
+
"[INFO] Generating TypeScript definitions",
|
|
2821
|
+
"[SUCCESS] Transpilation completed successfully"
|
|
2822
|
+
],
|
|
2823
|
+
transpilation_error: null,
|
|
2824
|
+
circuit_json_build_in_progress: false,
|
|
2825
|
+
circuit_json_build_started_at: new Date(Date.now() - 3e3).toISOString(),
|
|
2826
|
+
circuit_json_build_completed_at: new Date(Date.now() - 1e3).toISOString(),
|
|
2827
|
+
circuit_json_build_logs: [
|
|
2828
|
+
"[INFO] Starting circuit JSON build...",
|
|
2829
|
+
"[INFO] Loading custom 3D model",
|
|
2830
|
+
"[INFO] Validating CAD assembly structure",
|
|
2831
|
+
"[SUCCESS] Circuit JSON build completed"
|
|
2832
|
+
],
|
|
2833
|
+
circuit_json_build_error: null,
|
|
2834
|
+
build_in_progress: false,
|
|
2835
|
+
build_started_at: new Date(Date.now() - 1e4).toISOString(),
|
|
2836
|
+
build_completed_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2837
|
+
build_error: null,
|
|
2838
|
+
build_error_last_updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2839
|
+
build_logs: "Build process:\n1. Environment setup - OK\n2. Asset processing - OK\n3. Code compilation - OK\n4. 3D model validation - OK\nBuild completed successfully"
|
|
2840
|
+
});
|
|
2737
2841
|
};
|
|
2738
2842
|
|
|
2739
2843
|
// fake-snippets-api/lib/package_file/generate-fs-sha.ts
|
|
@@ -3525,10 +3629,15 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
|
|
|
3525
3629
|
};
|
|
3526
3630
|
}).filter((snippet) => snippet !== null);
|
|
3527
3631
|
},
|
|
3528
|
-
searchPackages: (query) => {
|
|
3632
|
+
searchPackages: (query, account_id) => {
|
|
3529
3633
|
const state = get();
|
|
3530
3634
|
const lowercaseQuery = query.toLowerCase();
|
|
3531
|
-
const
|
|
3635
|
+
const userOrgIds = account_id ? new Set(
|
|
3636
|
+
state.orgAccounts.filter((oa) => oa.account_id === account_id).map((oa) => oa.org_id)
|
|
3637
|
+
) : /* @__PURE__ */ new Set();
|
|
3638
|
+
const packages = state.packages.filter(
|
|
3639
|
+
(pkg) => pkg.is_public === true || account_id && pkg.owner_org_id && userOrgIds.has(pkg.owner_org_id)
|
|
3640
|
+
);
|
|
3532
3641
|
const matchingPackagesByMetadata = packages.filter(
|
|
3533
3642
|
(pkg) => pkg.name.toLowerCase().includes(lowercaseQuery) || pkg.description?.toLowerCase().includes(lowercaseQuery)
|
|
3534
3643
|
);
|
|
@@ -3747,17 +3856,19 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
|
|
|
3747
3856
|
);
|
|
3748
3857
|
},
|
|
3749
3858
|
addPackage: (_package) => {
|
|
3750
|
-
const
|
|
3859
|
+
const state = get();
|
|
3860
|
+
const nextId = state.idCounter + 1;
|
|
3751
3861
|
const newPackage = {
|
|
3752
|
-
package_id: `package_${
|
|
3862
|
+
package_id: `package_${nextId}`,
|
|
3753
3863
|
github_repo_full_name: null,
|
|
3754
3864
|
latest_pcb_preview_image_url: _package.latest_pcb_preview_image_url ?? `/api/packages/images/${_package.name}`,
|
|
3755
3865
|
latest_cad_preview_image_url: _package.latest_cad_preview_image_url ?? `/api/packages/images/${_package.name}`,
|
|
3756
3866
|
latest_sch_preview_image_url: _package.latest_sch_preview_image_url ?? `/api/packages/images/${_package.name}`,
|
|
3757
3867
|
..._package
|
|
3758
3868
|
};
|
|
3759
|
-
set((
|
|
3760
|
-
|
|
3869
|
+
set((state2) => ({
|
|
3870
|
+
idCounter: state2.idCounter + 1,
|
|
3871
|
+
packages: [...state2.packages, newPackage]
|
|
3761
3872
|
}));
|
|
3762
3873
|
return newPackage;
|
|
3763
3874
|
},
|
|
@@ -3793,12 +3904,15 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
|
|
|
3793
3904
|
);
|
|
3794
3905
|
},
|
|
3795
3906
|
addPackageRelease: (packageRelease) => {
|
|
3907
|
+
const state = get();
|
|
3908
|
+
const nextId = state.idCounter + 1;
|
|
3796
3909
|
const parsed = packageReleaseSchema.parse({
|
|
3797
|
-
package_release_id: `package_release_${
|
|
3910
|
+
package_release_id: `package_release_${nextId}`,
|
|
3798
3911
|
...packageRelease
|
|
3799
3912
|
});
|
|
3800
|
-
set((
|
|
3801
|
-
|
|
3913
|
+
set((state2) => ({
|
|
3914
|
+
idCounter: state2.idCounter + 1,
|
|
3915
|
+
packageReleases: [...state2.packageReleases, parsed]
|
|
3802
3916
|
}));
|
|
3803
3917
|
return parsed;
|
|
3804
3918
|
},
|
package/dist/schema.d.ts
CHANGED
|
@@ -965,8 +965,9 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
965
965
|
package_release_id: z.ZodString;
|
|
966
966
|
file_path: z.ZodString;
|
|
967
967
|
content_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
968
|
-
|
|
968
|
+
content_bytes: z.ZodOptional<z.ZodNullable<z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>>;
|
|
969
969
|
content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
970
|
+
created_at: z.ZodString;
|
|
970
971
|
is_release_tarball: z.ZodOptional<z.ZodBoolean>;
|
|
971
972
|
npm_pack_output: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
972
973
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -975,6 +976,7 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
975
976
|
file_path: string;
|
|
976
977
|
package_file_id: string;
|
|
977
978
|
content_text?: string | null | undefined;
|
|
979
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
978
980
|
content_mimetype?: string | null | undefined;
|
|
979
981
|
is_release_tarball?: boolean | undefined;
|
|
980
982
|
npm_pack_output?: any;
|
|
@@ -984,10 +986,41 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
984
986
|
file_path: string;
|
|
985
987
|
package_file_id: string;
|
|
986
988
|
content_text?: string | null | undefined;
|
|
989
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
990
|
+
content_mimetype?: string | null | undefined;
|
|
991
|
+
is_release_tarball?: boolean | undefined;
|
|
992
|
+
npm_pack_output?: any;
|
|
993
|
+
}>;
|
|
994
|
+
declare const packageFileLiteSchema: z.ZodObject<Omit<{
|
|
995
|
+
package_file_id: z.ZodString;
|
|
996
|
+
package_release_id: z.ZodString;
|
|
997
|
+
file_path: z.ZodString;
|
|
998
|
+
content_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
999
|
+
content_bytes: z.ZodOptional<z.ZodNullable<z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>>;
|
|
1000
|
+
content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1001
|
+
created_at: z.ZodString;
|
|
1002
|
+
is_release_tarball: z.ZodOptional<z.ZodBoolean>;
|
|
1003
|
+
npm_pack_output: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
1004
|
+
}, "content_text">, "strip", z.ZodTypeAny, {
|
|
1005
|
+
package_release_id: string;
|
|
1006
|
+
created_at: string;
|
|
1007
|
+
file_path: string;
|
|
1008
|
+
package_file_id: string;
|
|
1009
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
1010
|
+
content_mimetype?: string | null | undefined;
|
|
1011
|
+
is_release_tarball?: boolean | undefined;
|
|
1012
|
+
npm_pack_output?: any;
|
|
1013
|
+
}, {
|
|
1014
|
+
package_release_id: string;
|
|
1015
|
+
created_at: string;
|
|
1016
|
+
file_path: string;
|
|
1017
|
+
package_file_id: string;
|
|
1018
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
987
1019
|
content_mimetype?: string | null | undefined;
|
|
988
1020
|
is_release_tarball?: boolean | undefined;
|
|
989
1021
|
npm_pack_output?: any;
|
|
990
1022
|
}>;
|
|
1023
|
+
type PackageFileLite = z.infer<typeof packageFileLiteSchema>;
|
|
991
1024
|
type PackageFile = z.infer<typeof packageFileSchema>;
|
|
992
1025
|
declare const packageSchema: z.ZodObject<{
|
|
993
1026
|
package_id: z.ZodString;
|
|
@@ -1727,8 +1760,9 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1727
1760
|
package_release_id: z.ZodString;
|
|
1728
1761
|
file_path: z.ZodString;
|
|
1729
1762
|
content_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1730
|
-
|
|
1763
|
+
content_bytes: z.ZodOptional<z.ZodNullable<z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>>;
|
|
1731
1764
|
content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1765
|
+
created_at: z.ZodString;
|
|
1732
1766
|
is_release_tarball: z.ZodOptional<z.ZodBoolean>;
|
|
1733
1767
|
npm_pack_output: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
1734
1768
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1737,6 +1771,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1737
1771
|
file_path: string;
|
|
1738
1772
|
package_file_id: string;
|
|
1739
1773
|
content_text?: string | null | undefined;
|
|
1774
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
1740
1775
|
content_mimetype?: string | null | undefined;
|
|
1741
1776
|
is_release_tarball?: boolean | undefined;
|
|
1742
1777
|
npm_pack_output?: any;
|
|
@@ -1746,6 +1781,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1746
1781
|
file_path: string;
|
|
1747
1782
|
package_file_id: string;
|
|
1748
1783
|
content_text?: string | null | undefined;
|
|
1784
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
1749
1785
|
content_mimetype?: string | null | undefined;
|
|
1750
1786
|
is_release_tarball?: boolean | undefined;
|
|
1751
1787
|
npm_pack_output?: any;
|
|
@@ -2763,6 +2799,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2763
2799
|
file_path: string;
|
|
2764
2800
|
package_file_id: string;
|
|
2765
2801
|
content_text?: string | null | undefined;
|
|
2802
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
2766
2803
|
content_mimetype?: string | null | undefined;
|
|
2767
2804
|
is_release_tarball?: boolean | undefined;
|
|
2768
2805
|
npm_pack_output?: any;
|
|
@@ -3158,6 +3195,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
3158
3195
|
file_path: string;
|
|
3159
3196
|
package_file_id: string;
|
|
3160
3197
|
content_text?: string | null | undefined;
|
|
3198
|
+
content_bytes?: Buffer<ArrayBufferLike> | null | undefined;
|
|
3161
3199
|
content_mimetype?: string | null | undefined;
|
|
3162
3200
|
is_release_tarball?: boolean | undefined;
|
|
3163
3201
|
npm_pack_output?: any;
|
|
@@ -3464,4 +3502,4 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
3464
3502
|
type DatabaseSchema = z.infer<typeof databaseSchema>;
|
|
3465
3503
|
declare const tscircuitHandleSchema: z.ZodString;
|
|
3466
3504
|
|
|
3467
|
-
export { type Account, type AccountPackage, type AccountSnippet, type AiReview, type BugReport, type BugReportFile, type DatabaseSchema, type Datasheet, type GithubInstallation, type JlcpcbOrderState, type JlcpcbOrderStepRun, type LoginPage, type Order, type OrderFile, type OrderQuote, type OrgAccount, type OrgInvitation, type Organization, type Package, type PackageBuild, type PackageFile, type PackageRelease, type PublicAccount, type PublicOrgSchema, type QuotedComponent, type Session, type ShippingOption, type Snippet, type UserPermissions, accountPackageSchema, accountSchema, accountSnippetSchema, aiReviewSchema, bugReportFileResponseSchema, bugReportFileSchema, bugReportSchema, databaseSchema, datasheetPinInformationSchema, datasheetSchema, errorResponseSchema, errorSchema, githubInstallationSchema, jlcpcbOrderStateSchema, jlcpcbOrderStepRunSchema, log, loginPageSchema, orderFileSchema, orderQuoteSchema, orderSchema, orgAccountSchema, orgInvitationSchema, orgSchema, packageBuildSchema, packageFileSchema, packageReleaseSchema, packageSchema, publicAccountSchema, publicOrgSchema, quotedComponentSchema, sessionSchema, shippingInfoSchema, snippetSchema, tscircuitHandleSchema, userPermissionsSchema };
|
|
3505
|
+
export { type Account, type AccountPackage, type AccountSnippet, type AiReview, type BugReport, type BugReportFile, type DatabaseSchema, type Datasheet, type GithubInstallation, type JlcpcbOrderState, type JlcpcbOrderStepRun, type LoginPage, type Order, type OrderFile, type OrderQuote, type OrgAccount, type OrgInvitation, type Organization, type Package, type PackageBuild, type PackageFile, type PackageFileLite, type PackageRelease, type PublicAccount, type PublicOrgSchema, type QuotedComponent, type Session, type ShippingOption, type Snippet, type UserPermissions, accountPackageSchema, accountSchema, accountSnippetSchema, aiReviewSchema, bugReportFileResponseSchema, bugReportFileSchema, bugReportSchema, databaseSchema, datasheetPinInformationSchema, datasheetSchema, errorResponseSchema, errorSchema, githubInstallationSchema, jlcpcbOrderStateSchema, jlcpcbOrderStepRunSchema, log, loginPageSchema, orderFileSchema, orderQuoteSchema, orderSchema, orgAccountSchema, orgInvitationSchema, orgSchema, packageBuildSchema, packageFileLiteSchema, packageFileSchema, packageReleaseSchema, packageSchema, publicAccountSchema, publicOrgSchema, quotedComponentSchema, sessionSchema, shippingInfoSchema, snippetSchema, tscircuitHandleSchema, userPermissionsSchema };
|
package/dist/schema.js
CHANGED
|
@@ -275,11 +275,15 @@ var packageFileSchema = z.object({
|
|
|
275
275
|
package_release_id: z.string(),
|
|
276
276
|
file_path: z.string(),
|
|
277
277
|
content_text: z.string().nullable().optional(),
|
|
278
|
-
|
|
278
|
+
content_bytes: z.instanceof(Buffer).nullable().optional(),
|
|
279
279
|
content_mimetype: z.string().nullable().optional(),
|
|
280
|
+
created_at: z.string().datetime(),
|
|
280
281
|
is_release_tarball: z.boolean().optional(),
|
|
281
282
|
npm_pack_output: z.any().nullable().optional()
|
|
282
283
|
});
|
|
284
|
+
var packageFileLiteSchema = packageFileSchema.omit({
|
|
285
|
+
content_text: true
|
|
286
|
+
});
|
|
283
287
|
var packageSchema = z.object({
|
|
284
288
|
package_id: z.string(),
|
|
285
289
|
creator_account_id: z.string(),
|
|
@@ -493,6 +497,7 @@ export {
|
|
|
493
497
|
orgInvitationSchema,
|
|
494
498
|
orgSchema,
|
|
495
499
|
packageBuildSchema,
|
|
500
|
+
packageFileLiteSchema,
|
|
496
501
|
packageFileSchema,
|
|
497
502
|
packageReleaseSchema,
|
|
498
503
|
packageSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/fake-snippets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.164",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@tscircuit/mm": "^0.0.8",
|
|
90
90
|
"@tscircuit/pcb-viewer": "^1.11.256",
|
|
91
91
|
"@tscircuit/prompt-benchmarks": "^0.0.28",
|
|
92
|
-
"@tscircuit/runframe": "^0.0.
|
|
92
|
+
"@tscircuit/runframe": "^0.0.1399",
|
|
93
93
|
"@tscircuit/schematic-viewer": "^2.0.46",
|
|
94
94
|
"@tscircuit/simple-3d-svg": "^0.0.41",
|
|
95
95
|
"@types/babel__standalone": "^7.1.7",
|