-
Notifications
You must be signed in to change notification settings - Fork 4
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
Secret env command #210
Secret env command #210
Conversation
Ive also changed the naming for |
I've updated the description of this PR to include testing for the launching subshells with injected secrets. At the moment the standard jest testing that I have been writing wouldn't be able to deal with it but there should be a way to test this behaviour with jest. Roger has linked these packages https://github.com/jprichardson/node-suppose & https://github.com/nodejitsu/nexpect as references. I have validated the correct operation by running the command but it will still be better to include automated tests as well. The other task left for this is optimisation using Also the globbing currently only handles the single globstar |
Globbing has now been extended to include both |
Which globbing library did you use? Make sure that it is well supported
and ideally in typescript.
…On 7/14/21 4:00 PM, scottmmorris wrote:
Globbing has now been extended to include both |*| and |**| functionality
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#210 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE4OHPHXXCJUEYFWWXE4VDTXURYRANCNFSM5AIFDI5Q>.
|
At the moment I wrote my own code to handle globbing. A lot of the globbing libraries I looked at use a cwd to return output which is difficult with the EncryptedFS. This one allows you to supply an fs and is up-to-date but that would require a bit more work in creating a grpc call to handle this and returning the files. Alternatively, this library was another popular one but doesn't accept any other filesystems as far as I am aware of |
After trying the first library it seems that EFS is incompatible with the fs implementation specified by
|
The fs that can be supplied would be the VFS instance, not the EFS
instance. Would fast-glob work in that case? I'm working on EFS
extending VFS, so then EFS instance will be a VFS instance anyway.
…On 7/14/21 4:42 PM, scottmmorris wrote:
At the moment I wrote my own code to handle globbing. A lot of the
globbing libraries I looked at use a cwd to return output which is
difficult with the EncryptedFS. This
<https://www.npmjs.com/package/fast-glob> one allows you to supply an
fs and is up-to-date but that would require a bit more work in
creating a grpc call to handle this and returning the files.
Alternatively, this <https://www.npmjs.com/package/glob> one can
accept an array of files to glob but is less supported.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#210 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE4OHKT7C3BPILQQAG7BJ3TXUWTXANCNFSM5AIFDI5Q>.
|
After some testing we have opted to introduce the |
We expect some edge case bugs with the globbing since the upstream repo has bugs already in it that hasn't been fixed (https://github.com/terkelg/tiny-glob/issues). But it's not critical so we move ahead. As for bringing in the globbing code, make sure you're rewriting important parts with TypeScript, as the upstream |
This requires a rebase on top of client-refactoring given that much has changed. |
Sorry this was closed, it should have had its target changed to master. Can you try to edit this @scottmmorris? If not, it should just be reopened again... Ok I think this PR must be "recreated" then. |
Description
This PR aims to refactor the existing
pk secret env
command according to the specifications outlined in the Development Environment Usecase. Essentially the command should be able inject environment variable or allow sourcing variables into an existing subshell.Issues Fixed
pk secrets env
command for meeting Development Environment Usecase Polykey-CLI#31Tasks
pk secrets env
can be used to inject environment variables and run a subprocesspk secrets env
can be used to source environment variables and output something that can be used as a file to be sourced by a shellsecret env
command executing a subshellFinal checklist
npm test -- tests/bin/secret.test.ts
)npm test