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
3 changes: 2 additions & 1 deletion packages/input_secrets/src/input_secrets.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import ow from 'ow';
import { KeyObject } from 'crypto';
import { privateDecrypt, publicEncrypt } from '@apify/utilities';

import { ow } from './ow';

const BASE64_REGEXP = /[-A-Za-z0-9+/]*={0,3}/;
const ENCRYPTED_INPUT_VALUE_PREFIX = 'ENCRYPTED_VALUE';
const ENCRYPTED_INPUT_VALUE_REGEXP = new RegExp(`^${ENCRYPTED_INPUT_VALUE_PREFIX}:(${BASE64_REGEXP.source}):(${BASE64_REGEXP.source})$`);
Expand Down
9 changes: 9 additions & 0 deletions packages/input_secrets/src/ow.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file is needed to solve ow's false representation of the package in older versions.

// In CJS, to use ow, you need to call ow.default
// In ESM, you'd think `import ow from 'ow'` works, but it doesn't, because you need to import ow and use the default PROPERTY, not export.

import type { Ow } from 'ow';
import defOw = require('ow');

export const ow: Ow = defOw.default as Ow;