@usequark/quark-core 2.5.4 → 2.5.6

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024, Quark Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @techstream/quark-core
1
+ # @usequark/quark-core
2
2
 
3
3
  Shared infrastructure for the Quark platform - authentication, job queues, error handling, and utilities.
4
4
 
@@ -25,7 +25,7 @@ import {
25
25
  addJob,
26
26
  ValidationError,
27
27
  retryAsync,
28
- } from "@techstream/quark-core";
28
+ } from "@usequark/quark-core";
29
29
  ```
30
30
 
31
31
  All modules are re-exported from the package root. See JSDoc comments on each function for options and usage details.
@@ -36,16 +36,16 @@ Prefer a subpath when you want a smaller import graph or the browser-safe logger
36
36
 
37
37
  | Subpath | Contents |
38
38
  |---|---|
39
- | `@techstream/quark-core/core` | errors, logger, validation, utils, pagination, csrf, rate limiter, file validation, db |
40
- | `@techstream/quark-core/db` | Prisma singleton, connection string, pool config, `pingDatabase()` |
41
- | `@techstream/quark-core/admin` | Prisma schema introspection helpers |
42
- | `@techstream/quark-core/auth` | auth config helpers + session guards |
43
- | `@techstream/quark-core/auth/middleware` | session guards only |
44
- | `@techstream/quark-core/storage` | local adapter, storage factory, key/URL helpers, `createS3Storage` |
45
- | `@techstream/quark-core/storage/s3` | S3 adapter only |
46
- | `@techstream/quark-core/logger` | browser-safe logger |
47
- | `@techstream/quark-core/locale` | locale helpers |
48
- | `@techstream/quark-core/stripe` | Stripe client + webhook helpers |
39
+ | `@usequark/quark-core/core` | errors, logger, validation, utils, pagination, csrf, rate limiter, file validation, db |
40
+ | `@usequark/quark-core/db` | Prisma singleton, connection string, pool config, `pingDatabase()` |
41
+ | `@usequark/quark-core/admin` | Prisma schema introspection helpers |
42
+ | `@usequark/quark-core/auth` | auth config helpers + session guards |
43
+ | `@usequark/quark-core/auth/middleware` | session guards only |
44
+ | `@usequark/quark-core/storage` | local adapter, storage factory, key/URL helpers, `createS3Storage` |
45
+ | `@usequark/quark-core/storage/s3` | S3 adapter only |
46
+ | `@usequark/quark-core/logger` | browser-safe logger |
47
+ | `@usequark/quark-core/locale` | locale helpers |
48
+ | `@usequark/quark-core/stripe` | Stripe client + webhook helpers |
49
49
 
50
50
  `@aws-sdk/client-s3`, `@aws-sdk/s3-request-presigner`, `pg`, and `stripe` are optional peer dependencies. They are only loaded when the matching feature is used, so apps that do not use S3, `pingDatabase()`, or payments do not need them installed.
51
51
 
package/package.json CHANGED
@@ -1,80 +1,92 @@
1
1
  {
2
- "name": "@usequark/quark-core",
3
- "version": "2.5.4",
4
- "description": "Core utilities for Quark apps: auth, BullMQ queues, Redis, email, storage, rate limiting, logging, and error handling",
5
- "type": "module",
6
- "main": "src/index.js",
7
- "homepage": "https://github.com/usequark/quark#readme",
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/usequark/quark.git",
11
- "directory": "packages/core"
12
- },
13
- "bugs": {
14
- "url": "https://github.com/usequark/quark/issues"
15
- },
16
- "author": "Quark Contributors",
17
- "exports": {
18
- ".": "./src/index.js",
19
- "./core": "./src/core.js",
20
- "./admin": "./src/admin.js",
21
- "./auth": "./src/auth/index.js",
22
- "./auth/middleware": "./src/auth/middleware.js",
23
- "./db": "./src/db.js",
24
- "./email": "./src/email.js",
25
- "./errors": "./src/errors.js",
26
- "./locale": "./src/locale.js",
27
- "./logger": "./src/logger.js",
28
- "./metrics": "./src/metrics.js",
29
- "./queue": "./src/queue/index.js",
30
- "./sms": "./src/sms.js",
31
- "./storage": "./src/storage.js",
32
- "./storage/s3": "./src/storage-s3.js",
33
- "./stripe": "./src/stripe.js",
34
- "./testing": "./src/testing/index.js"
35
- },
36
- "dependencies": {
37
- "bcryptjs": "^3.0.3",
38
- "busboy": "^1.6.0",
39
- "bullmq": "^6.3.8",
40
- "ioredis": "^6.0.0",
41
- "nodemailer": "^10.0.10",
42
- "zod": "^4.6.5"
43
- },
44
- "peerDependencies": {
45
- "@aws-sdk/client-s3": "^3.1004.0",
46
- "@aws-sdk/s3-request-presigner": "^3.1004.0",
47
- "pg": "^8.20.0",
48
- "stripe": "^17.0.0"
49
- },
50
- "peerDependenciesMeta": {
51
- "@aws-sdk/client-s3": {
52
- "optional": true
53
- },
54
- "@aws-sdk/s3-request-presigner": {
55
- "optional": true
56
- },
57
- "pg": {
58
- "optional": true
59
- },
60
- "stripe": {
61
- "optional": true
62
- }
63
- },
64
- "devDependencies": {
65
- "@types/node": "^26.6.2"
66
- },
67
- "scripts": {
68
- "test": "node ../../scripts/run-tests.mjs src",
69
- "lint": "biome format --write && biome check --write"
70
- },
71
- "files": [
72
- "src",
73
- "README.md"
74
- ],
75
- "publishConfig": {
76
- "registry": "https://registry.npmjs.org",
77
- "access": "public"
78
- },
79
- "license": "MIT"
80
- }
2
+ "name": "@usequark/quark-core",
3
+ "version": "2.5.6",
4
+ "description": "Core utilities for Quark apps: auth, BullMQ queues, Redis, email, storage, rate limiting, logging, and error handling",
5
+ "keywords": [
6
+ "quark",
7
+ "nextjs",
8
+ "auth",
9
+ "bullmq",
10
+ "redis",
11
+ "email",
12
+ "storage",
13
+ "rate-limiting",
14
+ "logging",
15
+ "zod"
16
+ ],
17
+ "type": "module",
18
+ "main": "src/index.js",
19
+ "homepage": "https://github.com/usequark/quark#readme",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/usequark/quark.git",
23
+ "directory": "packages/core"
24
+ },
25
+ "bugs": {
26
+ "url": "https://github.com/usequark/quark/issues"
27
+ },
28
+ "author": "Quark Contributors",
29
+ "exports": {
30
+ ".": "./src/index.js",
31
+ "./core": "./src/core.js",
32
+ "./admin": "./src/admin.js",
33
+ "./auth": "./src/auth/index.js",
34
+ "./auth/middleware": "./src/auth/middleware.js",
35
+ "./db": "./src/db.js",
36
+ "./email": "./src/email.js",
37
+ "./errors": "./src/errors.js",
38
+ "./locale": "./src/locale.js",
39
+ "./logger": "./src/logger.js",
40
+ "./metrics": "./src/metrics.js",
41
+ "./queue": "./src/queue/index.js",
42
+ "./sms": "./src/sms.js",
43
+ "./storage": "./src/storage.js",
44
+ "./storage/s3": "./src/storage-s3.js",
45
+ "./stripe": "./src/stripe.js",
46
+ "./testing": "./src/testing/index.js"
47
+ },
48
+ "dependencies": {
49
+ "bcryptjs": "^3.0.3",
50
+ "busboy": "^1.6.0",
51
+ "bullmq": "^6.3.8",
52
+ "ioredis": "^6.0.0",
53
+ "nodemailer": "^10.0.10",
54
+ "zod": "^4.6.5"
55
+ },
56
+ "peerDependencies": {
57
+ "@aws-sdk/client-s3": "^3.1004.0",
58
+ "@aws-sdk/s3-request-presigner": "^3.1004.0",
59
+ "pg": "^8.20.0",
60
+ "stripe": "^17.0.0"
61
+ },
62
+ "peerDependenciesMeta": {
63
+ "@aws-sdk/client-s3": {
64
+ "optional": true
65
+ },
66
+ "@aws-sdk/s3-request-presigner": {
67
+ "optional": true
68
+ },
69
+ "pg": {
70
+ "optional": true
71
+ },
72
+ "stripe": {
73
+ "optional": true
74
+ }
75
+ },
76
+ "devDependencies": {
77
+ "@types/node": "^26.6.2"
78
+ },
79
+ "files": [
80
+ "src",
81
+ "README.md"
82
+ ],
83
+ "publishConfig": {
84
+ "registry": "https://registry.npmjs.org",
85
+ "access": "public"
86
+ },
87
+ "license": "MIT",
88
+ "scripts": {
89
+ "test": "node ../../scripts/run-tests.mjs src",
90
+ "lint": "biome format --write && biome check --write"
91
+ }
92
+ }
package/src/admin-auth.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core — Admin Authorization Module
2
+ * @usequark/quark-core — Admin Authorization Module
3
3
  *
4
4
  * Lightweight, stateless admin-token authorization for drop-in internal
5
5
  * endpoints (health checks, metrics, admin APIs).
@@ -72,7 +72,7 @@ export function verifyAdminToken(providedToken) {
72
72
  *
73
73
  * Usage in an API route:
74
74
  *
75
- * import { requireAdminToken } from "@techstream/quark-core";
75
+ * import { requireAdminToken } from "@usequark/quark-core";
76
76
  * import { NextResponse } from "next/server";
77
77
  *
78
78
  * export async function GET(request) {
package/src/admin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Prisma Schema Introspection
2
+ * @usequark/quark-core - Prisma Schema Introspection
3
3
  *
4
4
  * Hand-rolled Prisma schema parser that reads `.prisma` files and
5
5
  * extracts model and enum definitions. Used by the admin CRUD layer
@@ -10,7 +10,7 @@
10
10
  * where those packages are unavailable.
11
11
  *
12
12
  * Usage:
13
- * import { parseSchema, getModelByName, detectIdField, coerceId } from "@techstream/quark-core/admin";
13
+ * import { parseSchema, getModelByName, detectIdField, coerceId } from "@usequark/quark-core/admin";
14
14
  */
15
15
 
16
16
  import { existsSync, readFileSync } from "node:fs";
package/src/auth/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Authentication Module
2
+ * @usequark/quark-core - Authentication Module
3
3
  * Provides next-auth initialization and session management helpers
4
4
  */
5
5
 
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @techstream/quark-core - Auth Middleware
2
+ * @usequark/quark-core - Auth Middleware
3
3
  *
4
4
  * Lightweight, framework-agnostic authentication middleware for Server
5
5
  * Actions and API routes. The caller supplies a `getSession` function
6
6
  * (e.g. NextAuth's `auth()`) — this module adds the guard logic.
7
7
  *
8
8
  * Usage:
9
- * import { requireSession, requireSessionRole, createAuthMiddleware } from "@techstream/quark-core/auth/middleware";
9
+ * import { requireSession, requireSessionRole, createAuthMiddleware } from "@usequark/quark-core/auth/middleware";
10
10
  *
11
11
  * // In a Server Action:
12
12
  * const session = await requireSession(() => auth());
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Authorization Module
2
+ * @usequark/quark-core - Authorization Module
3
3
  * Policy-based, schema-agnostic RBAC engine
4
4
  */
5
5
 
package/src/core.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @techstream/quark-core - Core Barrel (Lightweight Utilities)
2
+ * @usequark/quark-core - Core Barrel (Lightweight Utilities)
3
3
  *
4
4
  * A smaller entry-point that exposes only the modules with zero or
5
5
  * minimal transitive dependencies: errors, logger, validation, utils,
6
6
  * pagination, csrf, rate-limiter, file-validation, and db.
7
7
  *
8
8
  * Downstream projects that only need these utilities can import from
9
- * "@techstream/quark-core/core" to avoid pulling in heavier modules
9
+ * "@usequark/quark-core/core" to avoid pulling in heavier modules
10
10
  * like email, storage, queue, or metrics.
11
11
  */
12
12
 
package/src/csrf.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - CSRF Protection Module
2
+ * @usequark/quark-core - CSRF Protection Module
3
3
  * Provides CSRF token generation and validation for API routes
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core — Database Instrumentation Module
2
+ * @usequark/quark-core — Database Instrumentation Module
3
3
  *
4
4
  * Schema-agnostic Prisma $extends middleware that monitors query execution
5
5
  * times and logs slow queries. All query arguments are automatically masked
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * Usage in client.js:
12
12
  *
13
- * import { createDbInstrumentation } from "@techstream/quark-core";
13
+ * import { createDbInstrumentation } from "@usequark/quark-core";
14
14
  * const base = new PrismaClient({ ... });
15
15
  * const ext = createDbInstrumentation();
16
16
  * if (ext) prisma = base.$extends(ext);
package/src/db-metrics.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core — Database Metrics Registry
2
+ * @usequark/quark-core — Database Metrics Registry
3
3
  *
4
4
  * Pre-registered Prometheus metrics for database query instrumentation.
5
5
  * Imported lazily by db-instrumentation.js to avoid circular dependencies.
package/src/db.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @techstream/quark-core - Database Utilities
2
+ * @usequark/quark-core - Database Utilities
3
3
  *
4
4
  * Shared Prisma client singleton, connection-string builder, pool config,
5
5
  * and a lightweight health-check ping. These replace the per-project
6
6
  * re-implementations in Regina / Pawdora / Trenchmate.
7
7
  *
8
8
  * Usage:
9
- * import { createPrismaClient, getConnectionString, pingDatabase } from "@techstream/quark-core/db";
9
+ * import { createPrismaClient, getConnectionString, pingDatabase } from "@usequark/quark-core/db";
10
10
  */
11
11
 
12
12
  // ---------------------------------------------------------------------------
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Email Templates
2
+ * @usequark/quark-core - Email Templates
3
3
  *
4
4
  * Reusable HTML email templates with plain-text fallbacks.
5
5
  * Each template function returns { subject, html, text }.
package/src/email.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @techstream/quark-core - Email Service
2
+ * @usequark/quark-core - Email Service
3
3
  *
4
4
  * Providers are defined using a Strategy Pattern - each implements the same
5
5
  * interface. Quark ships with three built-in providers (smtp, resend, zeptomail)
6
6
  * and exposes a registry so users can plug in any provider they need.
7
7
  *
8
8
  * @example Custom provider
9
- * import { EmailProvider, registerEmailProvider } from "@techstream/quark-core";
9
+ * import { EmailProvider, registerEmailProvider } from "@usequark/quark-core";
10
10
  *
11
11
  * class SendGridProvider extends EmailProvider {
12
12
  * async sendEmail(to, subject, html, text) { ... }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Error Reporter Module
2
+ * @usequark/quark-core - Error Reporter Module
3
3
  * Adapter/hook system for pluggable error reporting
4
4
  */
5
5
 
@@ -217,7 +217,7 @@ export class ErrorReporter {
217
217
  * @example
218
218
  * ```js
219
219
  * import * as Sentry from "@sentry/node";
220
- * import { errorReporter, createSentryAdapter } from "@techstream/quark-core";
220
+ * import { errorReporter, createSentryAdapter } from "@usequark/quark-core";
221
221
  *
222
222
  * Sentry.init({ dsn: "https://example@sentry.io/123" });
223
223
  * errorReporter.use(createSentryAdapter({ Sentry }));
package/src/errors.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Error Handling Module
2
+ * @usequark/quark-core - Error Handling Module
3
3
  * Standardized error types and utilities for consistent error handling
4
4
  */
5
5
 
@@ -2,34 +2,34 @@ import assert from "node:assert/strict";
2
2
  import { readFileSync } from "node:fs";
3
3
  import test from "node:test";
4
4
 
5
- import * as core from "@techstream/quark-core";
6
- import * as admin from "@techstream/quark-core/admin";
7
- import * as auth from "@techstream/quark-core/auth";
8
- import * as authMiddleware from "@techstream/quark-core/auth/middleware";
9
- import * as coreLight from "@techstream/quark-core/core";
10
- import * as db from "@techstream/quark-core/db";
11
- import * as email from "@techstream/quark-core/email";
12
- import * as errors from "@techstream/quark-core/errors";
13
- import * as locale from "@techstream/quark-core/locale";
14
- import * as logger from "@techstream/quark-core/logger";
15
- import * as metrics from "@techstream/quark-core/metrics";
16
- import * as queue from "@techstream/quark-core/queue";
17
- import * as sms from "@techstream/quark-core/sms";
18
- import * as storage from "@techstream/quark-core/storage";
19
- import * as storageS3 from "@techstream/quark-core/storage/s3";
20
- import * as stripe from "@techstream/quark-core/stripe";
21
- import * as testing from "@techstream/quark-core/testing";
5
+ import * as core from "@usequark/quark-core";
6
+ import * as admin from "@usequark/quark-core/admin";
7
+ import * as auth from "@usequark/quark-core/auth";
8
+ import * as authMiddleware from "@usequark/quark-core/auth/middleware";
9
+ import * as coreLight from "@usequark/quark-core/core";
10
+ import * as db from "@usequark/quark-core/db";
11
+ import * as email from "@usequark/quark-core/email";
12
+ import * as errors from "@usequark/quark-core/errors";
13
+ import * as locale from "@usequark/quark-core/locale";
14
+ import * as logger from "@usequark/quark-core/logger";
15
+ import * as metrics from "@usequark/quark-core/metrics";
16
+ import * as queue from "@usequark/quark-core/queue";
17
+ import * as sms from "@usequark/quark-core/sms";
18
+ import * as storage from "@usequark/quark-core/storage";
19
+ import * as storageS3 from "@usequark/quark-core/storage/s3";
20
+ import * as stripe from "@usequark/quark-core/stripe";
21
+ import * as testing from "@usequark/quark-core/testing";
22
22
 
23
23
  const packageJson = JSON.parse(
24
24
  readFileSync(new URL("../package.json", import.meta.url), "utf-8"),
25
25
  );
26
26
 
27
27
  // Guard against accidental subpath removals: every entry in the exports map
28
- // must resolve. apps/web imports `@techstream/quark-core/logger`, and the
28
+ // must resolve. apps/web imports `@usequark/quark-core/logger`, and the
29
29
  // scaffolded i18n/payment skills document `./locale` and `./stripe`.
30
30
  test("every subpath in package.json exports resolves", async () => {
31
31
  for (const subpath of Object.keys(packageJson.exports)) {
32
- const specifier = `@techstream/quark-core${
32
+ const specifier = `@usequark/quark-core${
33
33
  subpath === "." ? "" : subpath.slice(1)
34
34
  }`;
35
35
  await assert.doesNotReject(
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - File Validation
2
+ * @usequark/quark-core - File Validation
3
3
  *
4
4
  * Validates uploaded files: size limits, MIME type allow-lists,
5
5
  * and magic-byte verification to prevent MIME spoofing.
package/src/index.js CHANGED
@@ -54,5 +54,5 @@ export * from "./storage.js";
54
54
  export * from "./utils.js";
55
55
  export * from "./validation.js";
56
56
 
57
- // Testing utilities (import from "@techstream/quark-core/testing" in test files)
57
+ // Testing utilities (import from "@usequark/quark-core/testing" in test files)
58
58
  // Not re-exported from main to avoid polluting production imports
package/src/logger.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Logger Module
2
+ * @usequark/quark-core - Logger Module
3
3
  * Lightweight structured logger with zero external dependencies
4
4
  */
5
5
 
package/src/metrics.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Metrics Module
2
+ * @usequark/quark-core - Metrics Module
3
3
  * Lightweight application metrics with zero external dependencies.
4
4
  * Supports counters, gauges, and histograms with optional labels.
5
5
  * Exports Prometheus-compatible text format.
package/src/multipart.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Multipart Parser
2
+ * @usequark/quark-core - Multipart Parser
3
3
  *
4
4
  * Stream-based multipart/form-data parsing with early limit enforcement.
5
5
  * Works with Next.js App Router Request objects.
package/src/pagination.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @techstream/quark-core - Pagination Utilities
2
+ * @usequark/quark-core - Pagination Utilities
3
3
  *
4
4
  * Provides offset-based pagination helpers that integrate with Prisma's
5
5
  * skip/take API and the project's ValidationError convention.
6
6
  *
7
7
  * Usage in a route handler:
8
8
  *
9
- * import { parsePaginationQuery } from "@techstream/quark-core";
9
+ * import { parsePaginationQuery } from "@usequark/quark-core";
10
10
  *
11
11
  * export async function GET(request) {
12
12
  * const { searchParams } = new URL(request.url);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Query Builder
2
+ * @usequark/quark-core - Query Builder
3
3
  * Builds Prisma where/orderBy clauses from query parameters
4
4
  * with validation and sanitization.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Job Queue Module
2
+ * @usequark/quark-core - Job Queue Module
3
3
  * Provides BullMQ queue initialization and management
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Rate Limiting Module
2
+ * @usequark/quark-core - Rate Limiting Module
3
3
  * Provides both in-memory and Redis-based rate limiting
4
4
  */
5
5
 
@@ -70,7 +70,7 @@ function sanitizeObject(obj, fields = SENSITIVE_FIELDS) {
70
70
  * @returns {Function} Middleware function
71
71
  *
72
72
  * @example
73
- * import { createRequestLogger } from "@techstream/quark-core";
73
+ * import { createRequestLogger } from "@usequark/quark-core";
74
74
  *
75
75
  * const logRequest = createRequestLogger({
76
76
  * logRequestBody: true,
package/src/sms.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @techstream/quark-core - SMS Service
2
+ * @usequark/quark-core - SMS Service
3
3
  *
4
4
  * Providers are defined using a Strategy Pattern - each implements the same
5
5
  * interface. Quark ships with one built-in provider (twilio) and exposes a
6
6
  * registry so users can plug in any provider they need.
7
7
  *
8
8
  * @example Custom provider
9
- * import { SmsProvider, registerSmsProvider } from "@techstream/quark-core";
9
+ * import { SmsProvider, registerSmsProvider } from "@usequark/quark-core";
10
10
  *
11
11
  * class AmazonSnsProvider extends SmsProvider {
12
12
  * async sendSms(to, body) { ... }
package/src/storage-s3.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - S3 Storage Adapter
2
+ * @usequark/quark-core - S3 Storage Adapter
3
3
  *
4
4
  * Kept in its own module so `storage.js` (and the main barrel) never pull
5
5
  * the AWS SDK onto the import path: `@aws-sdk/client-s3` and
@@ -32,7 +32,7 @@ async function importS3ClientPackage() {
32
32
  } catch (error) {
33
33
  if (isMissingPackageError(error, S3_CLIENT_PACKAGE)) {
34
34
  throw new Error(
35
- 'S3 storage support requires installing "@aws-sdk/client-s3" in the app that uses @techstream/quark-core/storage/s3.',
35
+ 'S3 storage support requires installing "@aws-sdk/client-s3" in the app that uses @usequark/quark-core/storage/s3.',
36
36
  );
37
37
  }
38
38
  throw error;
@@ -47,7 +47,7 @@ async function importS3PresignerPackage() {
47
47
  } catch (error) {
48
48
  if (isMissingPackageError(error, S3_PRESIGNER_PACKAGE)) {
49
49
  throw new Error(
50
- 'Signed upload URLs require installing "@aws-sdk/s3-request-presigner" in the app that uses @techstream/quark-core/storage/s3.',
50
+ 'Signed upload URLs require installing "@aws-sdk/s3-request-presigner" in the app that uses @usequark/quark-core/storage/s3.',
51
51
  );
52
52
  }
53
53
  throw error;
package/src/storage.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - File Storage
2
+ * @usequark/quark-core - File Storage
3
3
  *
4
4
  * Adapter-based storage abstraction supporting local filesystem and
5
5
  * S3-compatible providers (AWS S3, Cloudflare R2, MinIO, etc.).
@@ -23,7 +23,7 @@ import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
23
23
  import { pipeline } from "node:stream/promises";
24
24
 
25
25
  // Import + re-export the S3 adapter so existing deep-imports continue
26
- // to work (`import { createS3Storage } from "@techstream/quark-core/storage"`).
26
+ // to work (`import { createS3Storage } from "@usequark/quark-core/storage"`).
27
27
  // storage-s3.js has no top-level AWS SDK imports, so this stays safe for
28
28
  // local-only deployments that never installed the optional peer deps.
29
29
  import { createS3Storage } from "./storage-s3.js";
package/src/stripe.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @techstream/quark-core - Stripe Integration
2
+ * @usequark/quark-core - Stripe Integration
3
3
  *
4
4
  * Thin wrappers around the Stripe SDK for client creation and webhook
5
5
  * verification. Stripe is an optional peer dependency — install it in the
6
6
  * app that uses payment features.
7
7
  *
8
8
  * Usage:
9
- * import { createStripeClient, getStripeWebhookEvent } from "@techstream/quark-core/stripe";
9
+ * import { createStripeClient, getStripeWebhookEvent } from "@usequark/quark-core/stripe";
10
10
  *
11
11
  * const stripe = await createStripeClient();
12
12
  * const session = await stripe.checkout.sessions.create({ ... });
@@ -30,7 +30,7 @@ async function importStripePackage() {
30
30
  } catch (error) {
31
31
  if (isMissingPackageError(error, "stripe")) {
32
32
  throw new Error(
33
- 'Stripe support requires installing "stripe" in the app that uses @techstream/quark-core/stripe.',
33
+ 'Stripe support requires installing "stripe" in the app that uses @usequark/quark-core/stripe.',
34
34
  );
35
35
  }
36
36
  throw error;
@@ -2,7 +2,7 @@
2
2
  * Test data factories for creating realistic test objects with sensible defaults.
3
3
  *
4
4
  * Usage:
5
- * import { createTestUser, createTestSession } from "@techstream/quark-core/testing";
5
+ * import { createTestUser, createTestSession } from "@usequark/quark-core/testing";
6
6
  * const user = createTestUser({ name: "Custom Name" });
7
7
  * const session = createTestSession({ user: { role: "admin" } });
8
8
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Quark test utilities - zero-dependency helpers for testing Quark applications.
3
3
  *
4
- * Import from `@techstream/quark-core/testing` in your test files:
4
+ * Import from `@usequark/quark-core/testing` in your test files:
5
5
  *
6
6
  * ```js
7
7
  * import {
@@ -17,7 +17,7 @@
17
17
  * createTestContext,
18
18
  * assertThrows,
19
19
  * assertApiResponse,
20
- * } from "@techstream/quark-core/testing";
20
+ * } from "@usequark/quark-core/testing";
21
21
  * ```
22
22
  *
23
23
  * @module testing
package/src/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @techstream/quark-core - Type Definitions
2
+ * @usequark/quark-core - Type Definitions
3
3
  * TypeScript types and JSDoc type definitions for better IDE support
4
4
  */
5
5
 
package/src/utils.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import crypto from "node:crypto";
2
2
 
3
3
  /**
4
- * @techstream/quark-core - Utility Functions
4
+ * @usequark/quark-core - Utility Functions
5
5
  * Common utility functions used across the platform
6
6
  */
7
7
 
@@ -111,7 +111,7 @@ export const isObject = (item) => {
111
111
  };
112
112
 
113
113
  /**
114
- * @deprecated Use `getErrorMessage` from `@techstream/quark-core/errors` instead.
114
+ * @deprecated Use `getErrorMessage` from `@usequark/quark-core/errors` instead.
115
115
  * Normalizes error messages for consistency
116
116
  * @param {Error|string} error - Error to normalize
117
117
  * @returns {string} Normalized error message