Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import * as yaml from 'js-yaml';
import { safeDump } from 'js-yaml';

// NOTE: The install methods will take care of adding a reference to a @custom pipeline. We don't need to add one here.
export const createDefaultPipeline = (dataset: string, type: string) => {
Expand All @@ -25,5 +25,5 @@ export const createDefaultPipeline = (dataset: string, type: string) => {
managed: true,
},
};
return yaml.dump(pipeline);
return safeDump(pipeline);
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import * as yaml from 'js-yaml';
import { safeDump } from 'js-yaml';

import { convertStringToTitle } from '../../utils';
import type { AssetOptions } from '../generate';
Expand All @@ -17,5 +17,5 @@ export const createDatasetManifest = (dataset: string, assetOptions: AssetOption
title: convertStringToTitle(dataset),
type,
};
return yaml.dump(manifest);
return safeDump(manifest);
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import * as yaml from 'js-yaml';
import { safeDump } from 'js-yaml';

import type { AssetOptions } from './generate';

Expand Down Expand Up @@ -34,5 +34,5 @@ export const createManifest = (assetOptions: AssetOptions) => {
},
};

return yaml.dump(manifest);
return safeDump(manifest);
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { dump } from 'js-yaml';
import { safeDump } from 'js-yaml';

import type { AssetsMap } from '../../../../common/types';

Expand All @@ -14,7 +14,7 @@ import type { RegistryDataStream } from '../../../../common';
import { resolveDataStreamFields } from './utils';

describe('resolveDataStreamFields', () => {
const statusAssetYml = dump([
const statusAssetYml = safeDump([
{
name: 'apache.status',
type: 'group',
Expand Down