npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@deepnote/cloud-sync

v0.1.0

Published

Sync and publish local folders with Deepnote Cloud (Node.js)

Readme

@deepnote/cloud-sync

Node.js workflows between a local folder and Deepnote Cloud: workspace sync, the sync manifest, app publishing, and Streamlit app registration.

Used by @deepnote/cli.

Installation

npm install @deepnote/cloud-sync

Usage

import { syncWorkspace } from "@deepnote/cloud-sync";

const result = await syncWorkspace({
  rootDir: "./deepnote-workspace",
  baseUrl: "https://api.deepnote.com",
  token: apiToken,
  onConflict: "skip",
  onEvent: (event) => console.log(event.kind),
});

Publish a build directory as the project's app. Inside a synced folder, the publish also updates the sync mirror.

import { publishApp } from "@deepnote/cloud-sync";

const result = await publishApp({
  dir: "./dist",
  projectId,
  baseUrl: "https://api.deepnote.com",
  token: apiToken,
  onEvent: (event) => console.log(event.kind),
});

Register a Streamlit app and wait for it. Creating an app restarts the project machine. waitForStreamlitApp is in @deepnote/cloud, which is not re-exported here.

import { waitForStreamlitApp } from "@deepnote/cloud";
import {
  createOrFindStreamlitApp,
  normalizeStreamlitEntrypoint,
} from "@deepnote/cloud-sync";

const entrypoint = normalizeStreamlitEntrypoint("apps/dashboard.py");
if (!entrypoint) {
  throw new Error("Streamlit entrypoint must be a project-relative file path");
}
const { app } = await createOrFindStreamlitApp(
  baseUrl,
  token,
  projectId,
  entrypoint,
);
await waitForStreamlitApp(baseUrl, token, app.id);

API reference

Options, conflict kinds, events and result shapes are documented on the exported types.

| Export | Description | | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | syncWorkspace(options) | Sync every project of a workspace with a local folder; conflicts go to the onConflict policy. | | publishApp(options) | Upload a directory into the project's app folder and enable sharing. Failed operations are listed in errors. | | normalizeStreamlitEntrypoint(path) | Normalize a project-relative file path, or null if it is unsafe. | | createOrFindStreamlitApp(baseUrl, token, projectId, entrypoint) | Create the Streamlit app, or find the one that already serves the entrypoint (created: false). | | findSyncManifestRoot, hasSyncManifest, loadSyncManifest, saveSyncManifest, SYNC_MANIFEST_FILENAME | Detect, read and write the .deepnote-sync.json manifest. Use these instead of parsing the JSON directly. | | projectFilesDir, isSafeRelativeFilePath, assertNoSymbolicLinkAncestors, baselineDiverged, sha256 | Local path and fingerprint helpers used by the sync engine. | | PublishError | Thrown by publishApp before any file changes: invalid input or an unavailable project (reason). | | PublishDivergedError | Thrown by publishApp before any file changes when files changed in Deepnote since the last sync, unless force. | | PublishMirrorError | An unusable sync folder. publishApp rethrows it as PublishError with reason invalid-input. | | ApiError | Thrown by API calls with the HTTP status in statusCode. Network failures and timeouts are the platform's own errors. |

Package vs. CLI

In this package: logic that reads or writes the synced folder or calls Deepnote Cloud, and the decisions about it.

  • Inputs are arguments: token, base URL and paths. Nothing reads environment variables or .env.
  • Results are return values, failures are thrown errors, progress is an event callback, and a decision such as a conflict is a callback.
  • No console output, process.exit or exit codes.

In the CLI: argument parsing, token resolution (flags, environment, .env), prompts, spinners, output formatting (including -o json), user-facing error wording, and exit codes.

If a second consumer would need the same code, it belongs here. If it is about how a terminal presents or interrupts the work, it stays in the CLI.