Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
patinthehat committed May 12, 2023
1 parent e74381b commit 2e5b54b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
7 changes: 5 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const outputs = {
file: 'dist/index.esm.mjs',
format: 'esm',
sourcemap: options.sourceMapsEnabled,
exports: 'auto',
plugins: [],
},
],
Expand All @@ -57,7 +58,9 @@ export default {
},
preventAssignment: true,
}),
commonjs(),
commonjs({
requireReturnsDefault: 'auto',
}),
nodeResolve(),
json(),
typescript(),
Expand All @@ -68,7 +71,7 @@ export default {
'dayjs',
'stopwatch-node',
'md5',
'@permafrost-dev/pretty-format',
//@permafrost-dev/pretty-format',
'stacktrace-js',
'xml-formatter',
'uuid',
Expand Down
9 changes: 3 additions & 6 deletions src/ArgumentConverter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const pf = require('@permafrost-dev/pretty-format');
// import * as format from '@permafrost-dev/pretty-format';
import { format } from '@permafrost-dev/pretty-format';

const prettyFormat = pf.format;
const prettyFormat = format;

export interface ArgumentConverterResult {
value: any;
Expand Down Expand Up @@ -30,9 +29,7 @@ export class ArgumentConverter {
}

public static prettyFormatForHtml(arg: any): string {
const formatted = prettyFormat(arg, {
indent: 4,
})
const formatted = prettyFormat(arg, { indent: ' ' } as any, ' ', 10, [], false)
// format whitespace for display in html
.replace(/ /g, ' ')
.replace(/\r\n|\r|\n/g, '<br>')
Expand Down
4 changes: 2 additions & 2 deletions src/Payloads/HtmlMarkupPayload.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Payload } from '../Payloads/Payload';
// import formatXml from 'xml-formatter';
import formatXml from 'xml-formatter';
import { formatHtmlForDisplay } from '../lib/utils';

const formatXml = require('xml-formatter').default;
// const formatXml = require('xml-formatter').default;

export type HtmlMarkupHighlightTypes = 'tailwindcss' | 'none';
export interface HtmlMarkupOptions {
Expand Down
4 changes: 2 additions & 2 deletions src/Payloads/XmlPayload.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Payload } from '../Payloads/Payload';
// import formatXml from 'xml-formatter/dist/esm/index';
import formatXml from 'xml-formatter/dist/esm/index';
import { formatHtmlForDisplay } from '../lib/utils';

const formatXml = require('xml-formatter');
// const formatXml = require('xml-formatter');

export class XmlPayload extends Payload {
protected value: string;
Expand Down
8 changes: 4 additions & 4 deletions src/Ray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@

// @ts-ignore
const BUILDING_STANDALONE_LIB = typeof __BUILDING_STANDALONE_LIB__ !== 'undefined' && __BUILDING_STANDALONE_LIB__ === 'true';
1;

//import * as md5lib from 'md5';
import * as md5lib from 'md5';
import { RayScreenColors } from '@/Concerns/RayScreenColors';
import { StackTrace } from '@/lib/stacktrace';
import { Mixin } from 'ts-mixer';
Expand Down Expand Up @@ -60,7 +59,8 @@ import { nonCryptoUuidV4, sleep } from './lib/utils';
import PACKAGE_VERSION from './lib/version';
import { Client } from './Client';

const md5 = require('md5');
// const md5 = require('md5');
const md5 = md5lib.default;

const getSync = StackTrace.getSync;

Expand Down Expand Up @@ -871,5 +871,5 @@ function standaloneInitialization() {
}

//if (BUILDING_STANDALONE_LIB) {
standaloneInitialization();
// standaloneInitialization();
//}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// "incremental": true, /* Enable incremental compilation */
"target": "ES2015" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
"lib": ["esnext", "DOM", "ScriptHost"] /* Specify library files to be included in the compilation. */,
"lib": ["esnext", "DOM"] /* Specify library files to be included in the compilation. */,
"allowJs": true /* Allow javascript files to be compiled. */,
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
Expand Down Expand Up @@ -54,7 +54,7 @@
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
"allowUmdGlobalAccess": true /* Allow accessing UMD globals from modules. */,
// "allowUmdGlobalAccess": true /* Allow accessing UMD globals from modules. */,

/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
Expand Down

0 comments on commit 2e5b54b

Please sign in to comment.