{"id":25059,"library":"cerebral-url-scheme-compiler","title":"cerebral-url-scheme-compiler","description":"A URL scheme compiler for the Cerebral state management framework (deprecated). Version 0.5.3 is the last release. It compiles path URLs into efficient getter and setter functions used by Cerebral actions. The package is deprecated due to Cerebral's evolution to v2+, which uses a different state access pattern. No longer maintained; alternatives include direct state access via Cerebral's props or other state libraries.","status":"deprecated","version":"0.5.3","language":"javascript","source_language":"en","source_url":"https://github.com/cerebral/cerebral-url-scheme-compiler","tags":["javascript","cerebral","url-scheme"],"install":[{"cmd":"npm install cerebral-url-scheme-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add cerebral-url-scheme-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add cerebral-url-scheme-compiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export from a subpath; named export from root does not exist.","wrong":"import { getCompiler } from 'cerebral-url-scheme-compiler'","symbol":"getCompiler","correct":"import getCompiler from 'cerebral-url-scheme-compiler/get'"},{"note":"Default export from a subpath; named export from root does not exist.","wrong":"import { setCompiler } from 'cerebral-url-scheme-compiler'","symbol":"setCompiler","correct":"import setCompiler from 'cerebral-url-scheme-compiler/set'"},{"note":"CommonJS require accesses the module's exports, which is the default function; there is no .getCompiler property on the root package.","wrong":"const getCompiler = require('cerebral-url-scheme-compiler').getCompiler","symbol":"require('cerebral-url-scheme-compiler/get')","correct":"const getCompiler = require('cerebral-url-scheme-compiler/get')"}],"quickstart":{"code":"import getCompiler from 'cerebral-url-scheme-compiler/get';\nimport { Controller, Module } from 'cerebral';\nconst app = Module({});\nconst controller = Controller(app);\nconst getValue = getCompiler('app.items.0.title');\nconst result = getValue({ state: controller.getState });","lang":"javascript","description":"Shows how to compile a URL path into a getter function and use it with a Cerebral controller."},"warnings":[{"fix":"Migrate to Cerebral v2+ which uses a different state access pattern via props or template literals.","message":"Package is deprecated and no longer maintained. Use with Cerebral v2+ is not supported.","severity":"deprecated","affected_versions":">=0.5.3"},{"fix":"Do not use with Cerebral v2+; consider alternatives like direct object path access.","message":"The package relies on Cerebral's internal state structure which changed significantly in v2.","severity":"breaking","affected_versions":">=0.5.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure your environment supports package exports or use a bundler that resolves subpath imports.","cause":"Subpath import requires Node.js >=12 or specific bundler configuration.","error":"Cannot find module 'cerebral-url-scheme-compiler/get'"},{"fix":"Use import getCompiler from 'cerebral-url-scheme-compiler/get' instead of from 'cerebral-url-scheme-compiler'.","cause":"Incorrect import: importing from root package instead of subpath.","error":"TypeError: getCompiler is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}