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

Back merge Main to Stage #1347

Merged
merged 3 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
808 changes: 431 additions & 377 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@colors/colors": "^1.5.0",
"@contentstack/cli-cm-export": "~1.11.1",
"@contentstack/cli-cm-import": "~1.14.2",
"@contentstack/cli-cm-import": "~1.14.3",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.6.0",
"async": "^3.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-import",
"description": "Contentstack CLI plugin to import content into stack",
"version": "1.14.2",
"version": "1.14.3",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down
8 changes: 5 additions & 3 deletions packages/contentstack-import/src/utils/asset-helper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Bluebird from 'bluebird';
import * as url from 'url';
import * as path from 'path';
import { ContentstackClient, managementSDKClient, escapeRegExp } from '@contentstack/cli-utilities';
import { ContentstackClient, managementSDKClient } from '@contentstack/cli-utilities';
import { ImportConfig } from '../types';
const debug = require('debug')('util:requests');
let _ = require('lodash');
Expand All @@ -10,6 +10,8 @@ let helper = require('./file-helper');

const MAX_RETRY_LIMIT = 5;

const escapeRegExp = (str: string) => str.replace(/[*+?^${}()|[\]\\]/g, '\\$&');

function validate(req: any) {
if (typeof req !== 'object') {
throw new Error(`Invalid params passed for request\n${JSON.stringify(arguments)}`);
Expand Down Expand Up @@ -249,8 +251,8 @@ export const lookupAssets = function (
assetUrls.forEach(function (assetUrl: any) {
let mappedAssetUrl = mappedAssetUrls[assetUrl];
if (typeof mappedAssetUrl !== 'undefined') {
const sanitizedUrl = escapeRegExp(assetUrl);
const escapedMappedUrl = escapeRegExp(mappedAssetUrl);
const sanitizedUrl = escapeRegExp(assetUrl).replace(/\.\./g, '\\$&');
const escapedMappedUrl = escapeRegExp(mappedAssetUrl).replace(/\.\./g, '\\$&');
entry = entry.replace(new RegExp(sanitizedUrl, 'img'), escapedMappedUrl);
matchedUrls.push(mappedAssetUrl);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-seed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-cm-import": "~1.14.2",
"@contentstack/cli-cm-import": "~1.14.3",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.6.0",
"inquirer": "8.2.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli",
"description": "Command-line tool (CLI) to interact with Contentstack",
"version": "1.16.0",
"version": "1.16.1",
"author": "Contentstack",
"bin": {
"csdx": "./bin/run"
Expand Down Expand Up @@ -30,7 +30,7 @@
"@contentstack/cli-cm-export": "~1.11.1",
"@contentstack/cli-cm-clone": "~1.10.1",
"@contentstack/cli-cm-export-to-csv": "~1.7.0",
"@contentstack/cli-cm-import": "~1.14.2",
"@contentstack/cli-cm-import": "~1.14.3",
"@contentstack/cli-cm-migrate-rte": "~1.4.15",
"@contentstack/cli-cm-seed": "~1.7.2",
"@contentstack/cli-command": "~1.2.17",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading