npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@satisfactory-dev/docs.json.ts

v0.12.2

Published

TypeScript mappings for the Docs.json file that ships with Satisfactory

Downloads

233

Readme

Coverage Status Workflow Status

Current Plan for Development:

  • If the relevant QA Site post gets resolved via a public announcement and/or the inclusion of a license:
    • all generated files will be included in the repo
    • Docs.json may be included
    • Docs.utf8.json may be included
  • the contents of data-progress.md do not indicate that data generation is valid, only that it spits out something.

Using

Troubleshooting

  • If SyntaxError: Invalid or unexpected token occurs
    • Clear out previous precompiled Ajv validators
    • Clear out the generated types folder
  • If validation fails despite no apparent changes to the schema
    • Clear out previous precompiled Ajv validators as the post-processing (conversion of custom types to regex, etc.) may have changed.

Requirements

  • Docker
    • recommend vscode devcontainer support
    • phpstorm's devcontainer support works but doesn't seem as capable
  • One or both of:
    • A copy of Update 8's Docs.json file
    • A copy of 1.0's equivalent of Docs.json files (they're semi-localised now)

Instructions

  1. Checkout locally
  2. Load in devcontainer-supporting IDE
    • devcontainer setup should automatically run make install
    • NODE_OPTIONS env var may require opening a fresh terminal if you receieve an error along the lines of TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
    • Copy Docs.json to ./data/update8/
    • Copy en-US.json to ./data/1.0/
  3. Run make validate
    • if this fails, either the Docs.json (or equivalent thereof) is wrong or the schema is out-of-date
    • if this succeeds, run make generate

IDE Integration

  • Docs.json.ts.dic can be used by JetBrains' IDEs to suppress false-positive matches in the spellchecker as a result of the contents of Docs.json
    • refer to JetBrains' own documentation for adding .dic files to the spell checking.
  • eslint can result in the IDE slowing to a crawl if the generated-types folder is not excluded during development.

In a separate project

  1. run npm install --save @satisfactory-dev/docs.json.ts
  2. refer to discover-types.ts for how to generate the types & data
  • You will need to replace the usage of the docs helper with something like the following (where ${__dirname}/data/ is the data path in your new project):

      ```ts
      const __dirname = __dirname_from_meta(import.meta);
      const ajv = new Ajv({
      	verbose: true,
      	logger: false,
      	allErrors: false,
      	code: {
      		source: true,
      		esm: true,
      		lines: true,
      		optimize: 2,
      	},
      });
      configure_ajv(ajv);
    
      export const docs = new DocsTsGenerator({
      	ajv,
      	docs_versions: {
      		version_1_0_0_0: new DocsTsGeneratorVersion({
      			docs_path: `${__dirname}/../data/1.0/en-US.json`,
      			cache_path: `${__dirname}/../data/1.0/`,
      			UnrealEngineString_quote_mode: 'double',
      		}),
      		update8: new DocsTsGeneratorVersion({
      			docs_path: `${__dirname}/../data/update8/Docs.json`,
      			cache_path: `${__dirname}/../data/update8/`,
      			UnrealEngineString_quote_mode: 'original',
      		}),
      	},
      });
      ```
    1. note: this package will auto-fix issues in generated code according to eslint configs relative to the directory passed to TypeDefinitionWriter::write()

License

see LICENSE.md