chore: stop tracking TypeScript emit under packages/*/src

Ignore .js/.js.map/.d.ts/.d.ts.map next to sources (tsc outDir is dist).
Preserve hand-written packages/auth/src/types/base58-universal.d.ts.

Made-with: Cursor
This commit is contained in:
defiQUG
2026-04-07 22:08:37 -07:00
parent 27c4012431
commit 923b703d97
149 changed files with 8 additions and 5504 deletions

View File

@@ -1,6 +0,0 @@
/**
* The Order Storage Package
*/
export * from './storage';
export * from './worm';
//# sourceMappingURL=index.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}

View File

@@ -1,6 +0,0 @@
/**
* The Order Storage Package
*/
export * from './storage';
export * from './worm';
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}

View File

@@ -1,29 +0,0 @@
/**
* Storage abstraction for S3/GCS
*/
import { S3Client } from '@aws-sdk/client-s3';
export interface StorageConfig {
provider: 's3' | 'gcs';
bucket: string;
region?: string;
accessKeyId?: string;
secretAccessKey?: string;
}
export interface StorageObject {
key: string;
content: Buffer | string;
contentType?: string;
metadata?: Record<string, string>;
}
export declare class StorageClient {
protected config: StorageConfig;
protected s3Client: S3Client;
protected bucket: string;
constructor(config: StorageConfig);
upload(object: StorageObject): Promise<string>;
download(key: string): Promise<Buffer>;
delete(key: string): Promise<void>;
getPresignedUrl(key: string, expiresIn: number): Promise<string>;
objectExists(key: string): Promise<boolean>;
}
//# sourceMappingURL=storage.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["storage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAKT,MAAM,oBAAoB,CAAC;AAG5B,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,IAAI,GAAG,KAAK,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED,qBAAa,aAAa;IAIZ,SAAS,CAAC,MAAM,EAAE,aAAa;IAH3C,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC7B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEH,MAAM,EAAE,aAAa;IAcrC,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAa9C,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAqBtC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASlC,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAShE,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAelD"}

View File

@@ -1,83 +0,0 @@
/**
* Storage abstraction for S3/GCS
*/
import { S3Client, PutObjectCommand, GetObjectCommand, DeleteObjectCommand, HeadObjectCommand, } from '@aws-sdk/client-s3';
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
export class StorageClient {
config;
s3Client;
bucket;
constructor(config) {
this.config = config;
this.bucket = config.bucket;
this.s3Client = new S3Client({
region: config.region || 'us-east-1',
credentials: config.accessKeyId && config.secretAccessKey
? {
accessKeyId: config.accessKeyId,
secretAccessKey: config.secretAccessKey,
}
: undefined,
});
}
async upload(object) {
const command = new PutObjectCommand({
Bucket: this.bucket,
Key: object.key,
Body: typeof object.content === 'string' ? Buffer.from(object.content) : object.content,
ContentType: object.contentType,
Metadata: object.metadata,
});
await this.s3Client.send(command);
return object.key;
}
async download(key) {
const command = new GetObjectCommand({
Bucket: this.bucket,
Key: key,
});
const response = await this.s3Client.send(command);
if (!response.Body) {
throw new Error(`Object ${key} not found or empty`);
}
const chunks = [];
if (response.Body) {
const body = response.Body;
for await (const chunk of body) {
chunks.push(chunk);
}
}
return Buffer.concat(chunks);
}
async delete(key) {
const command = new DeleteObjectCommand({
Bucket: this.bucket,
Key: key,
});
await this.s3Client.send(command);
}
async getPresignedUrl(key, expiresIn) {
const command = new GetObjectCommand({
Bucket: this.bucket,
Key: key,
});
return getSignedUrl(this.s3Client, command, { expiresIn });
}
async objectExists(key) {
try {
const command = new HeadObjectCommand({
Bucket: this.bucket,
Key: key,
});
await this.s3Client.send(command);
return true;
}
catch (error) {
if (error && typeof error === 'object' && 'name' in error && error.name === 'NotFound') {
return false;
}
throw error;
}
}
}
//# sourceMappingURL=storage.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"storage.js","sourceRoot":"","sources":["storage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAiB7D,MAAM,OAAO,aAAa;IAIF;IAHZ,QAAQ,CAAW;IACnB,MAAM,CAAS;IAEzB,YAAsB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC;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AM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}

View File

@@ -1,9 +0,0 @@
/**
* WORM (Write Once Read Many) mode storage
*/
import { StorageClient, StorageObject } from './storage';
export declare class WORMStorage extends StorageClient {
upload(object: StorageObject): Promise<string>;
delete(_key: string): Promise<void>;
}
//# sourceMappingURL=worm.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"worm.d.ts","sourceRoot":"","sources":["worm.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEzD,qBAAa,WAAY,SAAQ,aAAa;IACtC,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAS9C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG1C"}

View File

@@ -1,18 +0,0 @@
/**
* WORM (Write Once Read Many) mode storage
*/
import { StorageClient } from './storage';
export class WORMStorage extends StorageClient {
async upload(object) {
// WORM mode: prevent overwrites
const exists = await this.objectExists(object.key);
if (exists) {
throw new Error(`Object ${object.key} already exists in WORM storage`);
}
return await super.upload(object);
}
async delete(_key) {
throw new Error('Deletion not allowed in WORM mode');
}
}
//# sourceMappingURL=worm.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"worm.js","sourceRoot":"","sources":["worm.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAiB,MAAM,WAAW,CAAC;AAEzD,MAAM,OAAO,WAAY,SAAQ,aAAa;IAC5C,KAAK,CAAC,MAAM,CAAC,MAAqB;QAChC,gCAAgC;QAChC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnD,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,UAAU,MAAM,CAAC,GAAG,iCAAiC,CAAC,CAAC;QACzE,CAAC;QACD,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;CACF"}