Skip to content

Commit

Permalink
Remove lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushRedHat committed Jan 15, 2024
1 parent af86002 commit cee324c
Show file tree
Hide file tree
Showing 75 changed files with 3,702 additions and 4,200 deletions.
4 changes: 1 addition & 3 deletions lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ class Generator {
let authorizationName = 'anonymous';
const providedRegistry = this.registry.url;

console.log("check")
if (providedRegistry) {
arbOptions.registry = providedRegistry;
registryUrl = providedRegistry;
Expand All @@ -543,7 +542,6 @@ class Generator {
authorizationName = `//${registryUrl}:_auth`;
arbOptions.authorizationName = this.registry.auth;
}


//not sharing in logs neither token nor auth for security reasons
log.debug(`Using npm registry ${registryUrl} and authorization type ${authorizationName} to handle template installation.`);
Expand Down Expand Up @@ -587,7 +585,7 @@ class Generator {
...this.registry.extraAuth // For testing the verdaccio
};
if (this.registry) {
this.initialiseArbOptions(arbOptions);
this.initialiseArbOptions(arbOptions);
}

const arb = new Arborist(arbOptions);
Expand Down
2 changes: 1 addition & 1 deletion test/generator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ describe('Generator', () => {

it('works with a path to registry', async () => {
log.debug = jest.fn();
const gen = new Generator('nameOfTestTemplate', __dirname, {debug: true, registry: {url: 'some.registry.com', authorizationName:"sdfsf"}});
const gen = new Generator('nameOfTestTemplate', __dirname, {debug: true, registry: {url: 'some.registry.com', authorizationName: 'sdfsf'}});
await gen.installTemplate();
setTimeout(() => { // This puts the call at the end of the Node.js event loop queue.
expect(arboristMock.reify).toHaveBeenCalledTimes(1);
Expand Down
2 changes: 2 additions & 0 deletions test/test-project/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
always-auth=true
//localhost:4873/:_authToken="LwRGijjh4ZHXm+Q3FthZhA=="
3 changes: 3 additions & 0 deletions test/test-project/.yarncr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
npmRegistries:
"http://localhost:4873/":
npmAuthToken: LwRGijjh4ZHXm+Q3FthZhA==
15 changes: 5 additions & 10 deletions test/test-project/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,20 @@ services:
networks:
- mynetwork

test-project:
privileged: true
image: "node:${NODE_IMAGE_TAG}"
volumes:
- ../../:/app
command: bash /app/test/test-project/test.sh test-project

test-registry:
privileged: true
image: "node:${NODE_IMAGE_TAG}"
depends_on:
- verdaccio
image: "node:18"
environment:
- PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
volumes:
- ../../:/app
command: bash /app/test/test-project/test.sh test-registry
networks:
- mynetwork
depends_on:
- verdaccio



networks:
mynetwork:
Expand Down
Loading

0 comments on commit cee324c

Please sign in to comment.