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

DENO_DIR remapping in deno (supporting windows) #41

Closed
hayd opened this issue Jan 18, 2020 · 2 comments
Closed

DENO_DIR remapping in deno (supporting windows) #41

hayd opened this issue Jan 18, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@hayd
Copy link
Contributor

hayd commented Jan 18, 2020

At the moment you need to do:

# Compile the handler (and fetch dependencies into DENO_DIR).
DENO_DIR=.deno_dir deno fetch hello.ts

# This is the "remapping" step:
cp -R .deno_dir/gen/file/$PWD/ .deno_dir/LAMBDA_TASK_ROOT
# Note: We do the inverse of this operation in bootstrap.

zip lambda.zip -x '.deno_dir/gen/file/*' -r .deno_dir hello.ts  # other source files

I don't think this works in windows (if it does then this can be done with Deno.run).

Either

  1. rewrite for Windows Deno.run (using the equivalent windows commands, specifically zip)
  2. port/use a deno native zip library (e.g. JSZip, but this doesn't quite work yet).

Add this as https://deno.land/x/lambda/zip.ts (or something). Potentially support .npmignore (since this is respected by SAM it makes sense to emulate that).

@hayd hayd added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 18, 2020
@hayd hayd added the enhancement New feature or request label Feb 12, 2020
@hayd
Copy link
Contributor Author

hayd commented Apr 4, 2020

  1. will be possible in deno 0.40.0.

Edit: and should in fact be possible now with hayd/deno-zip.

@hayd
Copy link
Contributor Author

hayd commented Nov 3, 2021

I do not think DENO_DIR remapping works anymore at all. :(

I recommend using demo-lambda with docker so that it can be properly cached.

@hayd hayd closed this as completed Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant