Repository navigation
SK-3225: Split SDK into common / skyvault / flowvault; add FlowVault Node SDK - #348
saileshwar-skyflow wants to merge 4 commits into
Conversation
… SDK Restructure the single `skyflow-node` package into an npm-workspaces monorepo mirroring the Java SDK split (common / skyvault / flowvault). - common (private, bundled into each published package): the contract-agnostic core — errors, utils, jwt, logging, service-account auth, config/credentials, generic validations, mutable SDK identity, Base* request/response/options classes, the BaseSkyflow facade base, and the generated auth client. Builds and tests in isolation. - skyvault -> skyflow-node (2.x): the existing contract, public API unchanged (74 exports, byte-for-byte). Its Skyflow/models extend the common Base* classes; keeps connections, detect and its data-plane generated client. - flowvault -> skyflow-flowvault-node (1.x): new unary v2 contract (insert/get/update/delete/query/detokenize/getTokens/uploadFiles/deleteFiles) wired to the generated v2 client; reconciled with the Java/Python flowvault SDKs. Each layer re-exports common and bundles it (tsup) into a self-contained tarball (verified via npm pack); the mutable SDK identity makes each product self-report its own name@version. Independent versioning: plain-semver tags publish skyflow-node, flowvault/* tags publish skyflow-flowvault-node. Tests: common 232, skyvault 878 (backward compatibility preserved), flowvault 132 (~99.85% coverage). Per-package api-extractor contract snapshots gate the public API of both SDKs. PR CI builds and tests both SDKs with one command. Docs: docs/sdk-split-plan.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
🔐 Gitleaks Findings: 2 issue(s) detected 🔸 Rule: 🔸 Rule: |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
…/dist) - eslint.config.mjs: ignore all generated dirs (**/_generated_/**, legacy leading-space ** / _generated_/**), all workspace test dirs (**/test/**), and build output across workspaces — the old ignores only matched the single-package paths. - Replace three banned magic-string comparisons in hand-written code (typeof === "symbol"/"function") with equivalent non-literal checks. - Rule/gitleaks.toml: allowlist the maintainer-owned generated dirs (example JWTs) and the bundled dist/ output. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
CI resolves the skyflow-common symlink to its realpath (outside node_modules), so babel-jest was transforming the compiled common/lib and injecting core-js (an undeclared dep) -> suites failed to run. Add `common/lib` to transformIgnorePatterns so the already-CJS common package is loaded as-is. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
Covers the defensive edge branches the codecov/project gate flagged (net-new flowvault code dipped overall coverage 0.44% vs base): - empty/absent `records`/`response` bodies map to [] across all ops - per-record errors with no x-request-id header -> requestId null - getRequestId with an absent raw response - uploadFiles: non-Error PUT rejection, no-name/trailing-dot content-type, response record with no matching prepared columns - VaultClient: default log level, unrecognized cached auth type flowvault branches 92.51% -> 96.89% (statements/lines 100%); 132 -> 153 tests. No source/generated/config changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
Promptless documentation updates
|
SK-3225 — Split the SDK into
common/skyvault/flowvaultand add the FlowVault Node SDKRestructures the single
skyflow-nodepackage into an npm-workspaces monorepo mirroring the Java SDK split, and addsskyflow-flowvault-nodeas a second, independently-published product built from the same codebase.Modules
commonBase*request/response/options classes,BaseSkyflowfacade base, and the generated auth client. Builds & tests in isolation.skyvaultskyflow-nodeSkyflow/models extend thecommonBase*classes; keeps its data-plane generated client.flowvaultskyflow-flowvault-nodeinsert/get/update/delete/query/detokenize/getTokens/uploadFiles/deleteFiles, wired to the generated v2 client; reconciled against the Java/Python flowvault SDKs.How a product is selected
Solely by the installed npm package —
npm i skyflow-nodevsnpm i skyflow-flowvault-node. No build flags, runtime switches, or env config.Packaging & identity
commoninline (tsup,dist/) so the tarball is self-contained — noskyflow-commondependency ships (verified vianpm pack+ install into a fresh consumer;require()works for both).stripInternalkeeps internals out of the published.d.ts; only the public entry is exposed viaexports.setSdkIdentity) incommon, stamped per layer from an in-sourceversion.ts, makes each product self-report its ownname@versionin telemetry and error text (skyvaultv2.1.2, flowvaultv1.0.0).Versioning & CI
x.y.z) → publishesskyflow-node; prefixed (flowvault/x.y.z) → publishesskyflow-flowvault-node. Internal/JFrog releases routed per branch namespace.scripts/bump_version.sh <product> <version> [sha]bumps the rightpackage.json+version.ts.npm run build/npm testfan out across the workspace).contract-tests.yml).Tests
common232,skyvault878 (backward-compat preserved),flowvault132 (~99.85% statement coverage) — all green.Maintainer notes (flagged, not fixed — generated code untouched)
commonandflowvaultgenerated clients ship a top-levelClient.ts(patchV2VaultsId) that failsstrict(encodeURIComponenton a possibly-undefinedvaultId); unused by the hand-written layers (which compose resource clients directly), so it + itsindex.tsareexcluded in the relevant tsconfigs — a regeneration concern._generated_), preserved as-is.Full architecture, versioning, release flow and flags:
docs/sdk-split-plan.md.🤖 Generated with Claude Code