mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-12 17:34:27 +02:00
Fix Insomnia v4 environment importer
This commit is contained in:
@@ -184,6 +184,7 @@ function importEnvironment(
|
|||||||
workspaceId: string,
|
workspaceId: string,
|
||||||
isParent?: boolean,
|
isParent?: boolean,
|
||||||
): PartialImportResources['environments'][0] {
|
): PartialImportResources['environments'][0] {
|
||||||
|
isParent ??= e.parentId === workspaceId;
|
||||||
return {
|
return {
|
||||||
id: convertId(e._id),
|
id: convertId(e._id),
|
||||||
createdAt: e.created ? new Date(e.created).toISOString().replace('Z', '') : undefined,
|
createdAt: e.created ? new Date(e.created).toISOString().replace('Z', '') : undefined,
|
||||||
@@ -192,7 +193,8 @@ function importEnvironment(
|
|||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
sortPriority: e.metaSortKey, // Will be added to Yaak later
|
sortPriority: e.metaSortKey, // Will be added to Yaak later
|
||||||
base: isParent ?? e.parentId === workspaceId,
|
parentModel: isParent ? 'workspace' : 'environment',
|
||||||
|
parentId: null,
|
||||||
model: 'environment',
|
model: 'environment',
|
||||||
name: e.name,
|
name: e.name,
|
||||||
variables: Object.entries(e.data).map(([name, value]) => ({
|
variables: Object.entries(e.data).map(([name, value]) => ({
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export function Confirm({
|
|||||||
onChange={setConfirm}
|
onChange={setConfirm}
|
||||||
label={
|
label={
|
||||||
<>
|
<>
|
||||||
Type <strong className="select-auto cursor-text">{requireTyping}</strong> to confirm
|
Type <strong className="!select-auto cursor-auto">{requireTyping}</strong> to confirm
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user