Skip to content

Commit

Permalink
fix: fix compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Aug 21, 2024
1 parent eec0abd commit 9b1ea0e
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Script } from "./lib/radon/script"
import { Aggregator, GraphQLSource, HttpGetSource, HttpPostSource, RandomSource, Tally } from "./lib/radon/stages"
import { Request } from "./lib/radon/request"
import * as Types from "./lib/radon/types"
import { Script } from "./lib/radon/script.js"
import { Aggregator, GraphQLSource, HttpGetSource, HttpPostSource, RandomSource, Tally } from "./lib/radon/stages.js"
import { Request } from "./lib/radon/request.js"
import * as Types from "./lib/radon/types.js"

const TYPES = Types.TYPES;

Expand Down
4 changes: 2 additions & 2 deletions src/lib/rad2sol/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Scripts from "./scripts"
import * as Steps from "./steps"
import * as Scripts from "./scripts.js"
import * as Steps from "./steps.js"

export {
Scripts,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/radon/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Request } from './request';
import TYPES from './types';
import { Request } from './request.js';
import TYPES from './types.js';


export default {
Expand Down
4 changes: 3 additions & 1 deletion src/lib/radon/request.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {FILTERS, REDUCERS} from "./types";
import {FILTERS, REDUCERS} from "./types.js";

class Request {
constructor () {
Expand All @@ -7,6 +7,8 @@ class Request {
retrieve: [],
aggregate: null,
tally: null,
// This field is deprecated, it will default to 0 to be succesfully encoded
time_lock: 0,
},
value: 0,
witnesses: 2,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/radon/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { encode } from 'cbor2';
import {PSEUDOTYPES, typeFormat, TYPES, typeSystem} from "./types";
import {PSEUDOTYPES, typeFormat, TYPES, typeSystem} from "./types.js";

function unpackArgs(args) {
return args.map((arg) => {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/radon/stages.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { encode } from 'cbor2';
import { Script } from "./script";
import { FILTERS, REDUCERS, RETRIEVAL_METHODS, TYPES } from "./types";
import { graphQlSanitize } from "../../utils";
import { Script } from "./script.js";
import { FILTERS, REDUCERS, RETRIEVAL_METHODS, TYPES } from "./types.js";
import { graphQlSanitize } from "../../utils.js";

class Source extends Script {
constructor(kind, firstType) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/radon/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const typeSystem = {
const RETRIEVAL_METHODS = {
HttpGet: 0x01,
Rng: 0x02,
HttpPost: 0x03,
HttpPost: 0x03
}

// Helper function that helps pretty-printing RADON types
Expand Down

0 comments on commit 9b1ea0e

Please sign in to comment.