Skip to content

Commit 1e67f6a

Browse files
Merge branch 'main' into fix/back-merge-main
2 parents 2b1f20a + 8169a26 commit 1e67f6a

File tree

18 files changed

+177
-2
lines changed

18 files changed

+177
-2
lines changed

.github/workflows/unit-test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ jobs:
3030
- name: Test contentstack-auth
3131
working-directory: ./packages/contentstack-auth
3232
run: pnpm test
33+
<<<<<<< HEAD
3334
# Commented out in v2-beta production
3435
# - name: Test contentstack-utilities
3536
# working-directory: ./packages/contentstack-utilities
36-
# run: pnpm test
37+
# run: pnpm test
38+
=======
39+
- name: Test contentstack-utilities
40+
working-directory: ./packages/contentstack-utilities
41+
run: pnpm test
42+
>>>>>>> main

packages/contentstack-auth/.mocharc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
22
"require": [
33
"test/helpers/init.js",
4+
<<<<<<< HEAD
45
"ts-node/register",
56
"source-map-support/register",
67
"test/helpers/mocha-root-hooks.js"
8+
=======
9+
"ts-node/register/transpile-only",
10+
"source-map-support/register"
11+
>>>>>>> main
712
],
813
"watch-extensions": ["ts"],
914
"recursive": true,

packages/contentstack-auth/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"name": "@contentstack/cli-auth",
33
"description": "Contentstack CLI plugin for authentication activities",
4+
<<<<<<< HEAD
45
"version": "2.0.0-beta.10",
6+
=======
7+
"version": "1.8.0",
8+
>>>>>>> main
59
"author": "Contentstack",
610
"bugs": "https://github.com/contentstack/cli/issues",
711
"scripts": {
@@ -15,8 +19,13 @@
1519
"lint": "eslint src/**/*.ts"
1620
},
1721
"dependencies": {
22+
<<<<<<< HEAD
1823
"@contentstack/cli-command": "~2.0.0-beta.5",
1924
"@contentstack/cli-utilities": "~2.0.0-beta.5",
25+
=======
26+
"@contentstack/cli-command": "~1.8.0",
27+
"@contentstack/cli-utilities": "~1.18.0",
28+
>>>>>>> main
2029
"@oclif/core": "^4.8.3",
2130
"@oclif/plugin-help": "^6.2.28",
2231
"otplib": "^12.0.1"

packages/contentstack-auth/test/unit/auth-handler.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ import * as sinon from 'sinon';
33
import { authHandler, interactive } from '../../src/utils';
44
import { CLIError, cliux } from '@contentstack/cli-utilities';
55
import { User } from '../../src/interfaces';
6+
<<<<<<< HEAD
67
import { readFileSync } from 'fs';
78
import { join } from 'path';
89

910
const config = JSON.parse(readFileSync(join(__dirname, './config.json'), 'utf-8'));
11+
=======
12+
// @ts-ignore
13+
import * as config from './config.json';
14+
>>>>>>> main
1015

1116
const user: User = { email: '***REMOVED***', authtoken: 'testtoken' };
1217
const credentials = { email: '***REMOVED***', password: config.password };

packages/contentstack-auth/test/unit/commands/login.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ import {
99
authHandler as oauthHandler
1010
} from '@contentstack/cli-utilities';
1111
import * as managementSDK from '@contentstack/cli-utilities';
12+
<<<<<<< HEAD
1213
import { readFileSync } from 'fs';
1314
import { join } from 'path';
1415

1516
const conf = JSON.parse(readFileSync(join(__dirname, '../config.json'), "utf-8"));
17+
=======
18+
// @ts-ignore
19+
import * as conf from '../config.json';
20+
>>>>>>> main
1621

1722
const config = configHandler;
1823

packages/contentstack-auth/test/unit/commands/logout.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ import {
99
authHandler as oauthHandler
1010
} from '@contentstack/cli-utilities';
1111
import * as managementSDK from '@contentstack/cli-utilities';
12+
<<<<<<< HEAD
1213
import { readFileSync } from 'fs';
1314
import { join } from 'path';
1415

1516
const conf = JSON.parse(readFileSync(join(__dirname, '../config.json'), "utf-8"));
17+
=======
18+
// @ts-ignore
19+
import * as conf from '../config.json';
20+
>>>>>>> main
1621

1722
const config = configHandler;
1823

packages/contentstack-auth/test/unit/commands/tokens-add.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ import TokensAddCommand from '../../../src/commands/auth/tokens/add';
55
import { stub, assert } from 'sinon';
66
import { config as dotenvConfig } from 'dotenv';
77
import nock from 'nock';
8+
<<<<<<< HEAD
89
import { readFileSync } from 'fs';
910
import { join } from 'path';
1011

1112
const conf = JSON.parse(readFileSync(join(__dirname, '../config.json'), "utf-8"));
13+
=======
14+
// @ts-ignore
15+
import * as conf from '../config.json';
16+
>>>>>>> main
1217

1318
dotenvConfig();
1419

packages/contentstack-auth/test/unit/interactive.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ import { expect } from 'chai';
22
import * as sinon from 'sinon';
33
import { interactive } from '../../src/utils';
44
import { cliux } from '@contentstack/cli-utilities';
5+
<<<<<<< HEAD
56
import { readFileSync } from 'fs';
67
import { join } from 'path';
78

89
const config = JSON.parse(readFileSync(join(__dirname, './config.json'), "utf-8"));
10+
=======
11+
//@ts-ignore
12+
import * as config from './config.json'
13+
>>>>>>> main
914

1015
describe('Interactive', () => {
1116
let inquireStub: sinon.SinonStub;

packages/contentstack-auth/test/unit/mfa-handler.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ describe('MFAHandler', () => {
4646
});
4747

4848
it.skip('should fallback to stored configuration when environment variable is not set', async () => {
49+
<<<<<<< HEAD
50+
=======
51+
// Stubbing NodeCrypto.prototype does not affect already-created mfaHandler instance
52+
>>>>>>> main
4953
const encryptedSecret = 'encrypted-secret';
5054
configStub.returns({ secret: encryptedSecret });
5155
encrypterStub.decrypt.returns(validSecret);
@@ -65,4 +69,8 @@ describe('MFAHandler', () => {
6569
expect(authenticator.verify({ token: code, secret: envSecret })).to.be.true;
6670
});
6771
});
72+
<<<<<<< HEAD
73+
=======
74+
75+
>>>>>>> main
6876
});

packages/contentstack-command/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"name": "@contentstack/cli-command",
33
"description": "Contentstack CLI plugin for configuration",
4+
<<<<<<< HEAD
45
"version": "2.0.0-beta.5",
6+
=======
7+
"version": "1.8.0",
8+
>>>>>>> main
59
"author": "Contentstack",
610
"main": "lib/index.js",
711
"types": "lib/index.d.ts",
@@ -14,7 +18,11 @@
1418
"lint": "eslint src/**/*.ts"
1519
},
1620
"dependencies": {
21+
<<<<<<< HEAD
1722
"@contentstack/cli-utilities": "~2.0.0-beta.5",
23+
=======
24+
"@contentstack/cli-utilities": "~1.18.0",
25+
>>>>>>> main
1826
"contentstack": "^3.25.3",
1927
"@oclif/core": "^4.8.3",
2028
"@oclif/plugin-help": "^6.2.28"

0 commit comments

Comments
 (0)