@series-inc/stowkit-cli 0.6.37 → 0.6.39
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/firestore.d.ts +1 -0
- package/dist/firestore.js +3 -0
- package/dist/server.js +19 -3
- package/package.json +2 -2
package/dist/firestore.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export interface FirestoreClient extends FirestoreReader {
|
|
|
29
29
|
deletePackage(name: string): Promise<void>;
|
|
30
30
|
setVersion(packageName: string, version: string, data: FirestoreVersionDoc): Promise<void>;
|
|
31
31
|
}
|
|
32
|
+
export declare function clearFirestoreCache(): void;
|
|
32
33
|
/**
|
|
33
34
|
* Create a read-only Firestore client using the public API key.
|
|
34
35
|
* No service account or credentials needed — safe for CLI store commands,
|
package/dist/firestore.js
CHANGED
|
@@ -73,6 +73,9 @@ function objectToFields(data) {
|
|
|
73
73
|
// ─── In-memory cache ─────────────────────────────────────────────────────────
|
|
74
74
|
const CACHE_TTL_MS = 60_000; // 1 minute
|
|
75
75
|
const cache = new Map();
|
|
76
|
+
export function clearFirestoreCache() {
|
|
77
|
+
cache.clear();
|
|
78
|
+
}
|
|
76
79
|
function cacheGet(key) {
|
|
77
80
|
const entry = cache.get(key);
|
|
78
81
|
if (!entry)
|
package/dist/server.js
CHANGED
|
@@ -8,7 +8,7 @@ import { BlobStore } from './app/blob-store.js';
|
|
|
8
8
|
import { readProjectConfig, scanDirectory, readFile, writeFile, renameFile, deleteFile, getFileSnapshot, probeImageDimensions, } from './node-fs.js';
|
|
9
9
|
import { detectAssetType, readStowmeta, writeStowmeta, stowmetaToAssetSettings, assetSettingsToStowmeta, generateDefaultStowmeta, glbChildToAssetSettings, generateDefaultGlbChild, writeGlbChildSettings, } from './app/stowmeta-io.js';
|
|
10
10
|
import { readStowmat, writeStowmat, stowmatToMaterialConfig, materialConfigToStowmat } from './app/stowmat-io.js';
|
|
11
|
-
import { readCacheBlobs, writeCacheBlobs, buildCacheStamp, isCacheValid, } from './app/process-cache.js';
|
|
11
|
+
import { readCacheBlobs, writeCacheBlobs, buildCacheStamp, isCacheValid, deleteCacheFile, } from './app/process-cache.js';
|
|
12
12
|
import { buildPack, validatePackDependencies, processExtractedAnimations } from './pipeline.js';
|
|
13
13
|
import { syncRuntimeAssets } from './sync-runtime-assets.js';
|
|
14
14
|
import { parseGlb, pbrToMaterialConfig } from './encoders/glb-loader.js';
|
|
@@ -637,8 +637,16 @@ async function openProject(projectDir) {
|
|
|
637
637
|
BlobStore.setProcessed(key, data);
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
|
|
641
|
-
|
|
640
|
+
const processedData = BlobStore.getProcessed(file.relativePath);
|
|
641
|
+
if (processedData && processedData.length > 0) {
|
|
642
|
+
asset.status = 'ready';
|
|
643
|
+
asset.processedSize = processedData.length;
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
// Cache corrupt or missing processed blob — delete and reprocess
|
|
647
|
+
console.warn(`[cache] Corrupt cache for ${file.relativePath} — deleting and reprocessing`);
|
|
648
|
+
await deleteCacheFile(projectConfig.srcArtDir, file.relativePath);
|
|
649
|
+
}
|
|
642
650
|
}
|
|
643
651
|
}
|
|
644
652
|
}
|
|
@@ -1789,6 +1797,10 @@ async function handleRequest(req, res, staticApps) {
|
|
|
1789
1797
|
// GET /api/asset-store/registry — fetch the public registry
|
|
1790
1798
|
if (pathname === '/api/asset-store/registry' && req.method === 'GET') {
|
|
1791
1799
|
try {
|
|
1800
|
+
if (url.searchParams.get('refresh')) {
|
|
1801
|
+
const { clearFirestoreCache } = await import('./firestore.js');
|
|
1802
|
+
clearFirestoreCache();
|
|
1803
|
+
}
|
|
1792
1804
|
const { createFirestoreReader } = await import('./firestore.js');
|
|
1793
1805
|
const reader = createFirestoreReader();
|
|
1794
1806
|
const allPackages = await reader.listPackages();
|
|
@@ -1846,6 +1858,10 @@ async function handleRequest(req, res, staticApps) {
|
|
|
1846
1858
|
// GET /api/asset-store/packages — list all packages
|
|
1847
1859
|
if (pathname === '/api/asset-store/packages' && req.method === 'GET') {
|
|
1848
1860
|
try {
|
|
1861
|
+
if (url.searchParams.get('refresh')) {
|
|
1862
|
+
const { clearFirestoreCache } = await import('./firestore.js');
|
|
1863
|
+
clearFirestoreCache();
|
|
1864
|
+
}
|
|
1849
1865
|
const bucketParam = url.searchParams.get('bucket') ?? undefined;
|
|
1850
1866
|
const { createFirestoreReader } = await import('./firestore.js');
|
|
1851
1867
|
const { listStorePackages } = await import('./store.js');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@series-inc/stowkit-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.39",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"stowkit": "./dist/cli.js"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@google/genai": "^1.46.0",
|
|
22
22
|
"@series-inc/stowkit-editor": "^0.1.8",
|
|
23
|
-
"@series-inc/stowkit-packer-gui": "^0.1.
|
|
23
|
+
"@series-inc/stowkit-packer-gui": "^0.1.26",
|
|
24
24
|
"@strangeape/ffmpeg-audio-wasm": "^0.1.0",
|
|
25
25
|
"draco3d": "^1.5.7",
|
|
26
26
|
"fbx-parser": "^2.1.3",
|