Skip to content

Commit 2c6a40c

Browse files
authored
Merge pull request #87 from contentstack/staging
Merge staging to main
2 parents 1d0ca05 + a45e7e3 commit 2c6a40c

File tree

5 files changed

+37
-14
lines changed

5 files changed

+37
-14
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Contentstack
3+
Copyright (c) 2024 Contentstack
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ EXAMPLES
8080
$ csdx cm:stacks:validate-regex -a <management_token_alias> -c -g -f <path/to/the/directory>
8181
```
8282

83-
_See code: [src/commands/cm/stacks/validate-regex.ts](https://github.com/contentstack/cli-cm-regex-validate/blob/v1.1.12/src/commands/cm/stacks/validate-regex.ts)_
83+
_See code: [src/commands/cm/stacks/validate-regex.ts](https://github.com/contentstack/cli-cm-regex-validate/blob/v1.2.0/src/commands/cm/stacks/validate-regex.ts)_
8484
<!-- commandsstop -->

package-lock.json

Lines changed: 21 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@contentstack/cli-cm-regex-validate",
33
"description": "Validate Fields with Regex Property of Content Type and Global Field in a Stack",
4-
"version": "1.1.12",
4+
"version": "1.2.0",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli-cm-regex-validate/issues",
77
"devDependencies": {
@@ -63,7 +63,7 @@
6363
"dependencies": {
6464
"@contentstack/cli-command": "^1.2.16",
6565
"@contentstack/cli-utilities": "^1.5.7",
66-
"@contentstack/management": "^1.10.2",
66+
"@contentstack/management": "^1.13.0",
6767
"cli-table3": "^0.6.0",
6868
"cli-ux": "^6.0.9",
6969
"inquirer": "^8.2.4",

src/utils/connect-stack.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { cli } from "cli-ux";
22
import * as contentstackSdk from "@contentstack/management";
3-
3+
import { configHandler } from '@contentstack/cli-utilities';
44
import processStack from "./process-stack";
55
const regexMessages = require("../../messages/index.json").validateRegex;
66

@@ -14,9 +14,18 @@ export default async function connectStack(
1414
cli.action.start(regexMessages.cliAction.connectStackStart, "", {
1515
stdout: true,
1616
});
17-
const client = contentstackSdk.client({
17+
18+
const option: contentstackSdk.ContentstackConfig = {
1819
host: host,
19-
});
20+
}
21+
22+
// Adding early access headers
23+
const earlyAccessHeaders = configHandler.get(`earlyAccessHeaders`);
24+
if (earlyAccessHeaders && Object.keys(earlyAccessHeaders).length > 0) {
25+
option.early_access = Object.values(earlyAccessHeaders);
26+
}
27+
28+
const client = contentstackSdk.client(option);
2029
const stackInstance = client.stack({
2130
api_key: tokenDetails.apiKey,
2231
management_token: tokenDetails.token,

0 commit comments

Comments
 (0)