Skip to content

Register npm packages with jdeploy.com during publish#456

Merged
shannah merged 2 commits intomasterfrom
claude/fix-flexganttfx-registration-o2ibY
Apr 21, 2026
Merged

Register npm packages with jdeploy.com during publish#456
shannah merged 2 commits intomasterfrom
claude/fix-flexganttfx-registration-o2ibY

Conversation

@shannah
Copy link
Copy Markdown
Owner

@shannah shannah commented Apr 21, 2026

Summary

Fixes a bug where npm-only publishes were not registering the package name with jdeploy.com, causing the download page to fail with "No code found for package" errors.

Changes

  • NPMPublishDriver: Added registration step in prepare() method that calls bundleCodeService.fetchJdeployBundleCode() with the package name to register it with jdeploy.com
  • Dependencies: Injected BundleCodeService and PackageNameService into NPMPublishDriver constructor
  • Tests:
    • Added comprehensive NPMPublishDriverRegisterTest with two test cases:
      • Verifies that prepare() registers the package name for npm targets
      • Verifies that registration failures propagate to the caller (fail loudly)
    • Updated existing tests (MockNetworkPublishingTest, NPMPublishDriverPlatformBundlesTest) to provide the new dependencies

Implementation Details

  • The registration happens after maybePublishBundles() in the prepare() method
  • Uses PackageNameService.getFullPackageName() to get the correct package name format expected by the server-side /register endpoint
  • Errors during registration are propagated to fail the publish operation rather than silently skipping registration
  • This ensures that fresh npm-only publishes create the necessary bundles row on jdeploy.com

https://claude.ai/code/session_01NwazCR8XAUAgqTqF2ZemS9

claude added 2 commits April 21, 2026 18:41
NPMPublishDriver.prepare() was not triggering the /register call on
jdeploy.com, so an npm-only publish left the server with no bundles
row for the package. Subsequent /download requests then failed with
"No code found for package X" (PackageCodeService::fetchCode returns
null and throws).

The GitHub publish driver already had this call in its prepare().
This mirrors it in NPMPublishDriver so every publish path registers
the package up front.

Adds NPMPublishDriverRegisterTest verifying:
- prepare() calls bundleCodeService.fetchJdeployBundleCode with the
  bare package name for npm targets
- failures from the register call surface instead of being swallowed
shared/pom.xml used <version>LATEST</version> for
com.theokanning.openai-gpt3-java:service. Resolution went through the
sci-java repo, whose maven-metadata.xml still advertises 0.18.2 as the
latest/release version but whose storage now returns 404 for the jar.
The build fails even though Maven Central still serves the jar.

Pin to 0.18.2. Maven goes directly to Central and the sci-java
metadata lookup is bypassed. The LATEST metaversion is deprecated
anyway.
@shannah shannah merged commit 4da7cac into master Apr 21, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants