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
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,6 @@
"@opentelemetry/instrumentation-undici": "^0.14.0",
"@opentelemetry/otlp-exporter-base": "^0.203.0",
"@opentelemetry/semantic-conventions": "^1.36.0",
"@paralleldrive/cuid2": "^2.2.2",
"@reduxjs/toolkit": "1.9.7",
"@slack/webhook": "^7.0.1",
"@smithy/eventstream-codec": "^4.0.1",
Expand Down
1 change: 0 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,6 @@
"groupName": "@elastic/fleet dependencies",
"matchDepNames": [
"exponential-backoff",
"@paralleldrive/cuid2",
"isbinaryfile",
"js-search",
"openpgp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import React, { useState } from 'react';

import styled from 'styled-components';
import { createId } from '@paralleldrive/cuid2';
import { v4 as uuidv4 } from 'uuid';

import {
EuiButton,
Expand Down Expand Up @@ -145,7 +145,7 @@ export const SampleClientReadme = () => {

<EuiFlexGroup alignItems="center">
<EuiFlexItem grow={false}>
<EuiButton onClick={() => setApiKey(createId())} disabled={!!apiKey}>
<EuiButton onClick={() => setApiKey(uuidv4())} disabled={!!apiKey}>
Generate API key
</EuiButton>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { createId } from '@paralleldrive/cuid2';
import { randomUUID } from 'crypto';
import { encode, decode } from '@kbn/cbor';
import { errors as esErrors } from '@elastic/elasticsearch';
import type { ElasticsearchClient, Logger } from '@kbn/core/server';
Expand Down Expand Up @@ -224,7 +224,7 @@ export class ContentStream extends Duplex {

private getId(): string {
if (!this.id) {
this.id = createId();
this.id = randomUUID();
}
return this.id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import moment from 'moment';
import { Readable } from 'stream';
import mimeType from 'mime';
import { createId } from '@paralleldrive/cuid2';
import { randomUUID } from 'crypto';
import { type Logger, SavedObjectsErrorHelpers } from '@kbn/core/server';
import type { AuditLogger } from '@kbn/security-plugin/server';
import type { UsageCounter } from '@kbn/usage-collection-plugin/server';
Expand Down Expand Up @@ -130,7 +130,7 @@ export class FileClientImpl implements FileClient {
public async create<M = unknown>({ id, metadata }: CreateArgs): Promise<File<M>> {
const serializedMetadata = serializeJSON({ ...metadata, mimeType: metadata.mime });
const result = await this.metadataClient.create({
id: id || createId(),
id: id || randomUUID(),
metadata: {
...createDefaultFileAttributes(),
...serializedMetadata,
Expand Down