Skip to content

Commit 1596f76

Browse files
committed
fix: fix process not being defined in worker
1 parent ae10d6c commit 1596f76

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

packages/insomnia-smoke-test/tests/smoke/after-response-script-features.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ test.describe('after-response script features tests', () => {
9393
__fromAfterScript: 'environment',
9494
base_url: 'http://localhost:4010',
9595
});
96-
await page.getByRole('button', { name: 'Close' }).click();
96+
await page.getByRole('button', { name: 'Close', exact: true }).click();
9797

9898
// globals and baseGlobals can be persisted
9999
await page.getByTestId('underlay').click();

packages/insomnia/src/common/constants.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,5 +550,3 @@ export const RESPONSE_CODE_REASONS: Record<number, string> = {
550550

551551
// (ms) curently server timeout is 30s
552552
export const INSOMNIA_FETCH_TIME_OUT = 30_000;
553-
554-
export const PREF_SECURITY = 'Insomnia’s Preferences → Security';

packages/insomnia/src/common/interactive-messages.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { PREF_SECURITY } from '~/common/constants';
21
import { showSettingsModal } from '~/ui/components/modals/settings-modal';
32

3+
const PREF_SECURITY = 'Insomnia’s Preferences → Security';
4+
45
const interactives = [{ text: PREF_SECURITY, handler: () => showSettingsModal({ tab: 'general' }) }];
56

67
export function buildInteractiveMessage(message: string) {

packages/insomnia/src/common/validators.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { PREF_SECURITY } from '~/common/constants';
2-
31
import type { CaCertificate } from '../models/ca-certificate';
42
import type { ClientCertificate } from '../models/client-certificate';
53
import type { Settings } from '../models/settings';
64
import type { RenderedRequest } from '../templating/types';
75

6+
const PREF_SECURITY = 'Insomnia’s Preferences → Security';
7+
88
export function isFsAccessingAllowed(
99
renderedRequest: RenderedRequest,
1010
settings: Settings,

packages/insomnia/src/templating/base-extension-worker.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { PREF_SECURITY } from '~/common/constants';
2-
31
import packageJson from '../../package.json';
42
import type { CloudProviderCredential } from '../models/cloud-credential';
53
import type { Request } from '../models/request';
@@ -10,6 +8,9 @@ import type { NodeCurlRequestOptions } from '../plugins/context/network';
108
import type { Plugin } from '../plugins/index';
119
import type { BaseRenderContext, PluginTemplateTag, PluginTemplateTagContext, PluginToMainAPIPaths } from './types';
1210
import * as templating from './worker';
11+
12+
const PREF_SECURITY = 'Insomnia’s Preferences → Security';
13+
1314
export function decodeEncoding<T>(value: T) {
1415
if (typeof value !== 'string') {
1516
return value;

packages/insomnia/src/templating/base-extension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import os from 'node:os';
55

66
import iconv from 'iconv-lite';
77

8-
import { PREF_SECURITY } from '~/common/constants';
9-
108
import { database as db } from '../common/database';
119
import * as models from '../models/index';
1210
import type { Request } from '../models/request';
@@ -21,6 +19,7 @@ import type { BaseRenderContext, PluginTemplateTag, PluginTemplateTagContext } f
2119
import { decodeEncoding } from './utils';
2220

2321
const EMPTY_ARG = '__EMPTY_NUNJUCKS_ARG__';
22+
const PREF_SECURITY = 'Insomnia’s Preferences → Security';
2423

2524
export default class BaseExtension {
2625
_ext: PluginTemplateTag | null = null;

0 commit comments

Comments
 (0)