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

refactor #2

Merged
merged 1 commit into from
Jan 12, 2024
Merged

refactor #2

merged 1 commit into from
Jan 12, 2024

Conversation

derberg
Copy link

@derberg derberg commented Jan 11, 2024

please go through changes and see readme so you know how to run docker now

I identified issue with arborist, different options work there

I tested with external project

const Arborist = require('@npmcli/arborist');

async function dupa(){

    const arbOptions = {
        path: './',
        registry: 'http://localhost:4873',
        //'//localhost:4873/:_authToken': 'G3KoBlYDfuLgRGWii1gKlw=='
        '//localhost:4873/:_auth': 'YWRtaW46bmltZGE='
    };

    const arb = new Arborist(arbOptions);

    await arb.reify({
        add: ['@asyncapi/html-template'],
        saveType: 'prod',
        save: false
    });
}

dupa()

notice this part '//localhost:4873/:_auth': 'YWRtaW46bmltZGE=' - YWRtaW46bmltZGE= is base64 encoded value admin:nimda - the only way that this can work

the problem is that this script works well with verdaccio that I start with docker compose, through link localhost:4873
but generator still fails with Unable to authenticate, need: Basic, Bearer. Please pull my implementation and look, maybe because I worked on it all day, my eyes are tired

anyway in test you will notice http://verdaccio:4873 as url of registry - it is because this is what chatGPT told me, that the only way to access verdaccio service, from test script that is another service, is through container name

@AayushSaini101 AayushSaini101 merged commit 66c6e83 into AayushSaini101:issue-538 Jan 12, 2024
14 of 21 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