You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore(vs-extension): harden build and packaging pipeline
- Move SDK package.json inlining from a post-bundle string-replace to a
source-load esbuild plugin so minification cannot break the substitution.
Build-time assertion guards against drift if SDK call sites change.
- Stage all SDK data dirs (cip-proto, script-api, content-schemas,
scaffolds) into dist/data/ — was only scaffolds, leaving latent breakage
when content-validation / CIP / Script API code paths reach packageRoot.
- Replace zip/unzip CLI shellouts in inject-script-types.mjs with pure-Node
JSZip. Removes the host-binary requirement (improves Windows compatibility)
and the [Content_Types].xml shell-glob escapes. Fixes a regression where
injected entries were emitted without their leading-dot extension form.
- Production hardening: minify, drop:['debugger'], target node22,
legalComments:'none'.
- esbuild define injects __EXT_VERSION__ and __TELEMETRY_CONNECTION_STRING__
so telemetry.ts no longer readFileSync(package.json) at runtime.
- Single syncStaticAssets() shared by watch and production paths so the
two layouts can no longer drift.
- vscode:prepublish now builds @salesforce/b2c-script-types before the SDK
and the bundle, so a stale plugin tree can no longer ship.
- .vscodeignore: drop dead negations for HTML files that don't exist; add
dist/meta.json so ANALYZE_BUNDLE artifacts don't ship.
* fix(vs-extension): correctness and UX hardening (Phase 1)
Implements 7 audit items targeting present-day defects, not hypothetical
threats. Trust model: SCAPI specs are trusted, user-typed input via own
forms is trusted, single-developer workstation.
- ContentFileSystemProvider.stat() now returns a stable mtime (cached in
a Map<string, number> keyed by libraryId:contentId, bumped on writeFile
success) instead of Date.now() per call. VS Code no longer thinks
content files are constantly mutating; phantom "file modified
externally" prompts and silent buffer reloads are gone.
- WebDAV FileSystemProvider.rename() now delegates to instance.webdav.move
instead of unconditionally throwing NoPermissions. F2-rename works in
the explorer; cross-root attempts and 412 conflicts map to the right
FileSystemError values.
- Replaced sync fs.readFileSync/existsSync/statSync on the activation hot
path (B2CExtensionConfig) with vscode.workspace.fs async equivalents.
CAP file-decoration provider now answers via the existing capUris Set
in O(1) instead of two syscalls per paint.
- Long-running operations (sandbox clone polling, CAP install, deploy,
content export, Swagger UI proxy fetches) are now cancellable via
withProgress({cancellable: true}) and token.isCancellationRequested
checks at loop boundaries. Server-side abort requires SDK AbortSignal
support which is a separate change.
- Every TreeDataProvider now sets a stable TreeItem.id (e.g.,
realm:NAME, sandbox:REALM:ID, webdav:TYPE:PATH, api:family:NAME, etc.)
so expand state survives refresh and treeView.reveal() works without
try/catch fallback.
- 11 commands that previously bypassed registerSafeCommand — including
b2c-dx.sandbox.clone (a billable mutation) — now route through the
SafetyGuard pipeline with feature-usage telemetry. Added scriptTypes
to FeatureCategory and the command-prefix mapping.
- Dead code removal: createDeleteAndDeployCommand, tempDirs cleanup loop
in cartridge-commands, openExternal branch in Page Designer message
handler, and the never-implemented b2c-dx.codeSync.diffCartridge stub.
Harden the extension build and packaging pipeline. The esbuild bundle now minifies, drops debugger statements, targets Node 22 (matching VS Code 1.105's runtime), and inlines `require('@salesforce/b2c-tooling-sdk/package.json')` at SDK source-load time so minification can no longer break the substitution. SDK data directories that the runtime expects (`cip-proto`, `script-api`, `content-schemas`, `scaffolds`) are all staged into `dist/data/` instead of just `scaffolds`. The `inject-script-types` step that adds the bundled TypeScript Server plugin to the VSIX now uses pure-Node JSZip instead of shelling out to `zip`/`unzip`, removing the host-binary requirement (Windows CI compatibility) and fixing a regression where `[Content_Types].xml` entries for the injected plugin were emitted without their leading dot. The extension version and telemetry connection string are now injected as build-time constants, eliminating a runtime `readFileSync(package.json)`. `vscode:prepublish` now builds `@salesforce/b2c-script-types` before the extension bundle so a stale plugin tree can no longer ship.
Correctness and UX hardening pass across the extension:
6
+
7
+
-**Content libraries**: `ContentFileSystemProvider.stat()` now returns a stable `mtime` instead of `Date.now()` per call. VS Code no longer believes content files are constantly mutating, eliminating phantom "file modified externally" prompts and silent buffer reloads that could clobber unsaved edits.
8
+
-**WebDAV explorer**: F2-rename now works. The `rename()` method delegates to the SDK's `webdav.move` (already used by drag-and-drop) instead of throwing `NoPermissions`. Cross-root attempts and 412 conflicts are mapped to the right `vscode.FileSystemError`.
9
+
-**Activation performance**: replaced sync `fs.readFileSync` / `existsSync` / `statSync` on the activation hot path (`B2CExtensionConfig`) and in the per-paint CAP file-decoration provider with `vscode.workspace.fs` async equivalents and a Set lookup, respectively. CAP decorations now answer in O(1) without filesystem syscalls.
10
+
-**Cancellation**: long-running operations (sandbox clone polling, CAP install, deploy, content export, Swagger UI proxy fetches) now show a working Cancel button. Cancelling stops the local poll/wait; aborting the server-side operation requires SDK `AbortSignal` support which is a separate change.
11
+
-**Tree state stability**: every tree provider (sandbox, WebDAV, content libraries, API browser, cartridges) now sets a stable `TreeItem.id`, so expand/collapse state survives refresh and `treeView.reveal()` works without try/catch fallback.
12
+
-**Safety + telemetry coverage**: 11 contributed commands previously bypassed `registerSafeCommand`, including `b2c-dx.sandbox.clone` (a billable operation). All now route through the safety guard and feature-usage telemetry. Added a `scriptTypes` feature category and command-prefix mapping.
13
+
-**Dead code removal**: removed an unused `createDeleteAndDeployCommand`, the unused `tempDirs` cleanup loop in `cartridge-commands`, the dead `openExternal` branch in the Page Designer webview message handler, and the never-implemented `b2c-dx.codeSync.diffCartridge` command.
0 commit comments