Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to cache all std lib? #4403

Closed
cac24725 opened this issue Feb 27, 2024 · 2 comments
Closed

is it possible to cache all std lib? #4403

cac24725 opened this issue Feb 27, 2024 · 2 comments

Comments

@cac24725
Copy link

cac24725 commented Feb 27, 2024

for work in a network stricted environment, i want to cache as much as possible dependencies i will need, is it possible to do something like deno cache https://deno.land/std?

@cac24725
Copy link
Author

could be related to #4327

@kt3k
Copy link
Member

kt3k commented Feb 28, 2024

The below scripts list all entrypoints of std:

import "std/archive/mod.ts";
import "std/assert/mod.ts";
import "std/async/mod.ts";
import "std/bytes/mod.ts";
import "std/cli/mod.ts";
import "std/collections/mod.ts";
import "std/console/mod.ts";
import "std/crypto/mod.ts";
import "std/csv/mod.ts";
import "std/data_structures/mod.ts";
import "std/datetime/mod.ts";
import "std/dotenv/mod.ts";
import "std/encoding/ascii85.ts";
import "std/encoding/base32.ts";
import "std/encoding/base58.ts";
import "std/encoding/base64.ts";
import "std/encoding/base64url.ts";
import "std/encoding/hex.ts";
import "std/encoding/varint.ts";
import "std/expect/mod.ts";
import "std/flags/mod.ts";
import "std/fmt/bytes.ts";
import "std/fmt/colors.ts";
import "std/fmt/duration.ts";
import "std/fmt/printf.ts";
import "std/front_matter/mod.ts";
import "std/fs/mod.ts";
import "std/html/mod.ts";
import "std/http/mod.ts";
import "std/ini/mod.ts";
import "std/io/mod.ts";
import "std/json/mod.ts";
import "std/jsonc/mod.ts";
import "std/log/mod.ts";
import "std/media_types/mod.ts";
import "std/msgpack/mod.ts";
import "std/net/mod.ts";
import "std/path/mod.ts";
import "std/permissions/mod.ts";
import "std/regexp/mod.ts";
import "std/semver/mod.ts";
import "std/streams/mod.ts";
import "std/testing/bdd.ts";
import "std/testing/mock.ts";
import "std/testing/snapshot.ts";
import "std/testing/time.ts";
import "std/testing/types.ts";
import "std/text/mod.ts";
import "std/toml/mod.ts";
import "std/ulid/mod.ts";
import "std/url/mod.ts";
import "std/uuid/mod.ts";
import "std/webgpu/mod.ts";
import "std/yaml/mod.ts";

Run this script with deno.json:

{
  "imports": {
    "std/": "https://deno.land/std@0.217.0/"
  },
  "unstable": ["webgpu"]
}

Then all public APIs of the given version (0.217.0 in the above case) will be cached in DENO_DIR (you can check DENO_DIR with deno info command).

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

No branches or pull requests

3 participants