target-supabase-sdk 0.2.14 → 0.2.15
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/README.md +11 -0
- package/dist/browser.d.ts +1 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1 -1
- package/dist/chunks/{task-queue-qSnsfiIg.js → task-queue-DCY_0Qj0.js} +29 -2
- package/dist/chunks/task-queue-DCY_0Qj0.js.map +1 -0
- package/dist/node.js +2 -2
- package/dist/shared/utils/postgrest.utils.d.ts +23 -0
- package/dist/shared/utils/postgrest.utils.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/browser.ts +1 -0
- package/src/shared/utils/postgrest.utils.ts +28 -0
- package/dist/chunks/task-queue-qSnsfiIg.js.map +0 -1
package/dist/node.js
CHANGED
|
@@ -6,8 +6,8 @@ export { C as CLI_PROD_FLAG, S as SERVICE_ENV_PROFILE_ENV_KEY, w as SERVICE_ENV_
|
|
|
6
6
|
import { randomBytes, createHash } from 'node:crypto';
|
|
7
7
|
import { readFile, unlink, mkdir, writeFile, rename, access, stat, readdir, constants } from 'node:fs/promises';
|
|
8
8
|
import { dirname, resolve, join, isAbsolute } from 'node:path';
|
|
9
|
-
import {
|
|
10
|
-
export { A as ApiMethod, C as CategoryConfig, a as CategoryExtraction, b as CategoryLink, d as CategoryParcel, f as CategoryService, g as CategoryTask, D as DEFAULT_SYSTEM_REGISTRY_SEED_SLOTS, L as LINK_MANIFEST_VERSION, h as LIST_MANIFEST_VERSION, P as POST_TASK_DEFAULT_MAX_ATTEMPTS, i as ParcelManager, j as PostLinkValidator, S as ServiceLifecycleStatus, l as ServiceSlotStatus, T as TARGET_SYSTEM_REGISTRY_KEY, p as apiDetailsSchema, q as appendSystemRegistrySlots, r as assertRegistrySlotAvailable, s as assertRegistrySlotOwner, t as buildEmptyServiceSlots, u as buildLinkTargetDraft, v as buildListTargetDraft, w as buildSystemRegistryConfigDetails, y as classifyNetworkError, z as countTasksByType, B as createActiveServiceLifecycle, F as createClaimedRegistrySlotRuntimeState, G as createStorageProviderRegistry, H as createUploadTracker, I as decodeLogBatch, J as decodeLogBatchList, K as defaultL3ServiceDetails, M as deleteParcel, O as deleteParcelSchema,
|
|
9
|
+
import { bi as sha256Hex, bo as getErrorMessage, bp as LOG_TOPIC_NODE, aM as postRegisterNode, aq as patchChangeNodeStatus, N as NodeStatus, aB as patchStopNode, ay as patchNodeHeartBeat, E as EMPTY_REGISTRY_SLOT_RUNTIME_STATE, b8 as runRegistrySlotGuardCheck, a_ as registrySlotRuntimePatchFromGuardResult, c as CategoryNode, U as evaluateBusyNodeLiveness, aA as patchServiceRuntime, ah as isLogEntry, x as claimServiceRegistrySlot, k as ServiceRegistryError, e as CategoryRepo, R as ResultCode, bq as LOG_TOPIC_TASK, m as TASK_REPO_USAGE, a7 as getScanRemoteRepoValues, au as patchClaimTask, br as CRITICAL_UNKNOWN_TASK_TRACE_ID, as as patchChangeTaskStatus, o as TaskStatusAction, bs as toError, aU as postTaskSchema, bt as createTaskRow, n as TaskStatus } from './chunks/task-queue-DCY_0Qj0.js';
|
|
10
|
+
export { A as ApiMethod, C as CategoryConfig, a as CategoryExtraction, b as CategoryLink, d as CategoryParcel, f as CategoryService, g as CategoryTask, D as DEFAULT_SYSTEM_REGISTRY_SEED_SLOTS, L as LINK_MANIFEST_VERSION, h as LIST_MANIFEST_VERSION, P as POST_TASK_DEFAULT_MAX_ATTEMPTS, i as ParcelManager, j as PostLinkValidator, S as ServiceLifecycleStatus, l as ServiceSlotStatus, T as TARGET_SYSTEM_REGISTRY_KEY, p as apiDetailsSchema, q as appendSystemRegistrySlots, r as assertRegistrySlotAvailable, s as assertRegistrySlotOwner, t as buildEmptyServiceSlots, u as buildLinkTargetDraft, v as buildListTargetDraft, w as buildSystemRegistryConfigDetails, y as classifyNetworkError, z as countTasksByType, B as createActiveServiceLifecycle, F as createClaimedRegistrySlotRuntimeState, G as createStorageProviderRegistry, H as createUploadTracker, I as decodeLogBatch, J as decodeLogBatchList, K as defaultL3ServiceDetails, M as deleteParcel, O as deleteParcelSchema, Q as escapeIlikePattern, V as fetchBinaryWithRetry, W as fetchWithRetry, X as fieldDefinitionSchema, Y as flattenLogBatch, Z as flattenLogBatches, _ as formatNetworkError, $ as getApi, a0 as getApiSchema, a1 as getConfig, a2 as getConfigSchema, a3 as getExtraction, a4 as getExtractionSchema, a5 as getParcel, a6 as getParcelSchema, a8 as getScanRemoteRepoValuesSchema, a9 as getService, aa as getServiceSchema, ab as getTargetSystemRegistry, ac as getValueAtPath, ad as installChunkFetchRegistry, ae as isHttpUrl, af as isLocalFilesystemPath, ag as isLogBatchList, ai as isOpaqueChunkUrl, aj as isRetryableHttpStatus, ak as linkTargetDraftBuildInputSchema, al as parcelDetailsSchema, am as parseLogBatchMeta, an as parseProviderPrefixedUrl, ao as parseServiceSlot, ap as parseServiceSlots, ar as patchChangeNodeStatusSchema, at as patchChangeTaskStatusSchema, av as patchClaimTaskSchema, aw as patchExtractionObjects, ax as patchExtractionObjectsSchema, az as patchNodeHeartBeatSchema, aC as patchStopNodeSchema, aD as patchTaskProgress, aE as patchTaskProgressSchema, aF as postApi, aG as postApiSchema, aH as postExtraction, aI as postExtractionSchema, aJ as postLinkCreate, aK as postParcel, aL as postParcelSchema, aN as postRegisterNodeSchema, aO as postService, aP as postServiceInstance, aQ as postServiceSchema, aR as postSystemRegistryConfig, aS as postSystemRegistryConfigSchema, aT as postTask, aV as postTaskWithRetry, aW as publishParcel, aX as registerProviderChunkResolver, aY as registerService, aZ as registerServiceAtStartup, a$ as releaseSystemRegistrySlots, b0 as releaseSystemRegistrySlotsByServiceId, b1 as requestHasBody, b2 as resetSystemRegistryConfig, b3 as resetSystemRegistryConfigSchema, b4 as resolveActiveRegistryServiceId, b5 as resolveFetchUrl, b6 as restoreParcel, b7 as restoreParcelById, b9 as sanitizeFileName, ba as sanitizeParcelFileName, bb as scanExtractionList, bc as scanExtractionListSchema, bd as schemaDefinitionSchema, be as serviceDetailsSchema, bf as serviceLifecycleSchema, bg as serviceNodeSnapshotSchema, bh as serviceRuntimeSchema, bj as summarizeTaskQueue, bk as systemRegistrySeedSlotSchema, bl as toPostgrestTextArrayLiteral, bm as unregisterService, bn as unregisterServiceAtShutdown } from './chunks/task-queue-DCY_0Qj0.js';
|
|
11
11
|
import { spawn } from 'node:child_process';
|
|
12
12
|
import { tmpdir } from 'node:os';
|
|
13
13
|
import { pathToFileURL } from 'node:url';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PostgREST / Supabase JS client helpers for `target` table filters.
|
|
3
|
+
*
|
|
4
|
+
* @see `.cursor/skills/postgrest-query-filters/SKILL.md`
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Escape `%`, `_`, and `\` for PostgREST `ilike` patterns.
|
|
8
|
+
* Also strips commas — they break `.or()` filter strings when multiple columns are searched.
|
|
9
|
+
*/
|
|
10
|
+
export declare function escapeIlikePattern(raw: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Format a JS string array as a PostgreSQL `text[]` literal for PostgREST filter values.
|
|
13
|
+
*
|
|
14
|
+
* Required when tag values contain `:` or other special characters, and when using
|
|
15
|
+
* `.filter(column, "not.ov", literal)` — `.not("column", "ov", jsArray)` stringifies
|
|
16
|
+
* with `Array#toString()` and produces an invalid array literal.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* toPostgrestTextArrayLiteral(["stop-word:base", "small-word"])
|
|
20
|
+
* // → '{"stop-word:base","small-word"}'
|
|
21
|
+
*/
|
|
22
|
+
export declare function toPostgrestTextArrayLiteral(values: readonly string[]): string;
|
|
23
|
+
//# sourceMappingURL=postgrest.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgrest.utils.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/postgrest.utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE7E"}
|
package/package.json
CHANGED
package/src/browser.ts
CHANGED
|
@@ -233,6 +233,7 @@ export {
|
|
|
233
233
|
classifyNetworkError,
|
|
234
234
|
formatNetworkError,
|
|
235
235
|
} from "./shared/utils/network-error";
|
|
236
|
+
export { escapeIlikePattern, toPostgrestTextArrayLiteral } from "./shared/utils/postgrest.utils";
|
|
236
237
|
export type { SanitizeFileNameOptions } from "./shared/utils/safe-file-name";
|
|
237
238
|
export { sanitizeFileName, sanitizeParcelFileName } from "./shared/utils/safe-file-name";
|
|
238
239
|
export { sha256Hex } from "./shared/utils/sha256";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PostgREST / Supabase JS client helpers for `target` table filters.
|
|
3
|
+
*
|
|
4
|
+
* @see `.cursor/skills/postgrest-query-filters/SKILL.md`
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Escape `%`, `_`, and `\` for PostgREST `ilike` patterns.
|
|
9
|
+
* Also strips commas — they break `.or()` filter strings when multiple columns are searched.
|
|
10
|
+
*/
|
|
11
|
+
export function escapeIlikePattern(raw: string): string {
|
|
12
|
+
return raw.replace(/\\/g, "\\\\").replace(/%/g, "\\%").replace(/_/g, "\\_").replace(/,/g, "");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Format a JS string array as a PostgreSQL `text[]` literal for PostgREST filter values.
|
|
17
|
+
*
|
|
18
|
+
* Required when tag values contain `:` or other special characters, and when using
|
|
19
|
+
* `.filter(column, "not.ov", literal)` — `.not("column", "ov", jsArray)` stringifies
|
|
20
|
+
* with `Array#toString()` and produces an invalid array literal.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* toPostgrestTextArrayLiteral(["stop-word:base", "small-word"])
|
|
24
|
+
* // → '{"stop-word:base","small-word"}'
|
|
25
|
+
*/
|
|
26
|
+
export function toPostgrestTextArrayLiteral(values: readonly string[]): string {
|
|
27
|
+
return `{${values.map((v) => `"${v.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`).join(",")}}`;
|
|
28
|
+
}
|