Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@float-capital/float-subgraph-uncrashable

Package Overview
Dependencies
Maintainers
5
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@float-capital/float-subgraph-uncrashable - npm Package Compare versions

Comparing version 0.0.0-alpha.3 to 0.0.0-alpha.4

2

package.json
{
"name": "@float-capital/float-subgraph-uncrashable",
"version": "0.0.0-alpha.3",
"version": "0.0.0-alpha.4",
"description": "Safe Subgraph Code Generation Framework by Float",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -14,3 +14,3 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

var outputEntityFilePath = "./src/" + generatedFolderName;
var outputEntityFilePath = "./" + generatedFolderName;

@@ -17,0 +17,0 @@ var safeMode = Belt_Option.getWithDefault(env.SAFE_MODE, "false");

@@ -79,3 +79,3 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

function outputCode(entityImports, networkIdPrefix, functions) {
return "import {\n" + entityImports + "\n} from \"../../" + CodegenConfig.generatedFolderName + "/schema\";\nimport {\n Address,\n BigInt,\n Bytes,\n BigDecimal,\n log,\n Entity,\n dataSource, \n} from \"@graphprotocol/graph-ts\";\n\nexport let NETWORK_NAME = dataSource.network(); // e.g. \"mainnet\", \"matic\", \"avalanche\", \"ropsten\", \"poa-core\"\n\nfunction getIdPrefix(network: string): string {\n" + networkIdPrefix + "\n}\nexport let ENTITY_ID_PREFIX = getIdPrefix(NETWORK_NAME);\n\nfunction ensureEntityIdHasCorrectPrefix(entityId: string): string {\n if (entityId.startsWith(ENTITY_ID_PREFIX)) {\n return entityId;\n } else {\n return ENTITY_ID_PREFIX + entityId;\n }\n}\n\nexport class GetOrCreateReturn<EntityType> {\n entity: EntityType;\n wasCreated: boolean;\n\n constructor(entity: EntityType, wasCreated: boolean) {\n this.entity = entity;\n this.wasCreated = wasCreated;\n }\n}\n" + functions + "\n";
return "import {\n" + entityImports + "\n} from \"./schema\";\nimport {\n Address,\n BigInt,\n Bytes,\n BigDecimal,\n log,\n Entity,\n dataSource, \n} from \"@graphprotocol/graph-ts\";\n\nexport let NETWORK_NAME = dataSource.network(); // e.g. \"mainnet\", \"matic\", \"avalanche\", \"ropsten\", \"poa-core\"\n\nfunction getIdPrefix(network: string): string {\n" + networkIdPrefix + "\n}\nexport let ENTITY_ID_PREFIX = getIdPrefix(NETWORK_NAME);\n\nfunction ensureEntityIdHasCorrectPrefix(entityId: string): string {\n if (entityId.startsWith(ENTITY_ID_PREFIX)) {\n return entityId;\n } else {\n return ENTITY_ID_PREFIX + entityId;\n }\n}\n\nexport class GetOrCreateReturn<EntityType> {\n entity: EntityType;\n wasCreated: boolean;\n\n constructor(entity: EntityType, wasCreated: boolean) {\n this.entity = entity;\n this.wasCreated = wasCreated;\n }\n}\n" + functions + "\n";
}

@@ -82,0 +82,0 @@

@@ -322,4 +322,4 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

}
Fs.writeFileSync(outputFilePath + "/UncrashableHelpers.ts", GraphEntityGenTemplates.outputCode(entityImports, entityPrefixDefinition, functions), "utf8");
console.log("Output saved to " + outputFilePath + "UncrashableHelpers.ts");
Fs.writeFileSync(outputFilePath + "/UncrashableEntityHelpers.ts", GraphEntityGenTemplates.outputCode(entityImports, entityPrefixDefinition, functions), "utf8");
console.log("Output saved to " + outputFilePath + "/UncrashableEntityHelpers.ts");

@@ -326,0 +326,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc