Skip to content

Commit 6de4e22

Browse files
committed
Merge remote-tracking branch 'origin/development' into feat/CS-43112-gcp-support
2 parents 767b581 + 09fc486 commit 6de4e22

4 files changed

Lines changed: 55 additions & 35 deletions

File tree

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 Solutions
3+
Copyright (c) 2024 Contentstack Solutions
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

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "contentstack-cli-tsgen",
33
"description": "Generate TypeScript typings from a Stack.",
4-
"version": "2.2.3",
4+
"version": "2.3.0",
55
"author": "Michael Davis",
66
"bugs": "https://github.com/Contentstack-Solutions/contentstack-cli-tsgen/issues",
77
"dependencies": {
8-
"@contentstack/cli-command": "^1.2.13",
9-
"@contentstack/cli-utilities": "^1.5.2",
8+
"@contentstack/cli-command": "^1.2.17",
9+
"@contentstack/cli-utilities": "^1.5.10",
1010
"lodash": "^4.17.20",
1111
"prettier": "^2.0.5",
1212
"tslib": "^1.13.0"

src/lib/stack/client.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as http from 'https'
22
import * as async from 'async'
3-
import {ContentTypeCollection} from 'contentstack'
3+
import { ContentTypeCollection } from 'contentstack'
4+
import { configHandler } from "@contentstack/cli-utilities"
45

56
type RegionUrlMap = {
67
[prop: string]: string;
@@ -38,6 +39,7 @@ export async function stackConnect(client: any, config: StackConnectionConfig, c
3839
environment: string,
3940
region: string,
4041
branch?: string
42+
early_access?: string[]
4143
} = {
4244
api_key: config.apiKey,
4345
delivery_token: config.token,
@@ -47,6 +49,12 @@ export async function stackConnect(client: any, config: StackConnectionConfig, c
4749
if (config.branch) {
4850
clientParams.branch = config.branch
4951
}
52+
53+
const earlyAccessHeaders = configHandler.get(`earlyAccessHeaders`);
54+
if (earlyAccessHeaders && Object.keys(earlyAccessHeaders).length > 0) {
55+
clientParams.early_access = Object.values(earlyAccessHeaders);
56+
}
57+
5058
// eslint-disable-next-line new-cap
5159
const stack = client(clientParams)
5260
// check and update host if doesn't exists in REGION_URL_MAPPING

0 commit comments

Comments
 (0)