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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@doreamonjs/page-creator

v1.15.0

Published

page-creator for doreamonjs

Readme

@doreamonjs/page-creator (doremaonjs soul)

@doreamonjs/page-creator compiles a manifest into runtime config/model/page factories.

Agent Skills (CLI: Cursor, Claude, Gemini, …)

The published package includes an Agent Skill (Cursor-compatible) under skills/page-creator/: SKILL.md (main instructions) and reference.md (extra detail). Skills are not loaded from node_modules automatically—you copy the folder into a location your agent reads.

Install the package

yarn add @doreamonjs/page-creator
# or: npm install @doreamonjs/page-creator

Use yarn upgrade @doreamonjs/page-creator (or reinstall) when you want a newer skill text; then run install-skill again.

CLI: install-skill (recommended)

The npm package is @doreamonjs/page-creator. It registers a page-creator executable (see bin in this package’s package.json — that name is the CLI command, not the npm package name).

A — With the package already in your project (recommended):

yarn add -D @doreamonjs/page-creator
# or: npm install --save-dev @doreamonjs/page-creator

Then run the local binary (executable name page-creator, from this package):

npm exec page-creator install-skill
# Yarn 2+ (Berry):
yarn exec page-creator install-skill
# Yarn 1 (Classic): no `yarn exec`; use the bin path or an npm script (below)
./node_modules/.bin/page-creator install-skill

Or add to package.json:

"scripts": {
  "install-skill": "page-creator install-skill"
}

and run yarn install-skill / npm run install-skill (PATH includes node_modules/.bin).

B — One-shot, without saving the dependency

Use the scoped package name and invoke the page-creator binary explicitly:

# npm (npm 7+)
npm exec --yes --package=@doreamonjs/page-creator -- page-creator install-skill

# npx (same idea)
npx --yes --package=@doreamonjs/page-creator page-creator install-skill

# Yarn 2+ (Berry): dlx downloads a temp copy of the package
yarn dlx @doreamonjs/page-creator page-creator install-skill

# pnpm
pnpm dlx @doreamonjs/page-creator page-creator install-skill

Default behavior: Cursor + Claude Code + Gemini CLI, project scope (under current directory).

Options:

| Flag | Meaning | | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | --targets | Comma list: cursor, claude, gemini, agents (Codex / .agents/skills), or all. Default: cursor,claude,gemini. | | --scope | project (default) — install under --cwd. user — install under your home directory (global skills for that tool). | | --cwd | Base path for project scope (default: current working directory). | | --dry-run | Print destinations only. |

Examples:

npm exec --yes --package=@doreamonjs/page-creator -- page-creator install-skill --targets all --scope project
yarn exec page-creator install-skill --targets cursor,claude --scope user
yarn dlx @doreamonjs/page-creator page-creator install-skill --cwd /path/to/repo

Destination roots:

  • Cursor: .cursor/skills/page-creator or ~/.cursor/skills/page-creator
  • Claude Code: .claude/skills/page-creator or ~/.claude/skills/page-creator
  • Gemini CLI: .gemini/skills/page-creator or ~/.gemini/skills/page-creator
  • agents (Codex-style): .agents/skills/page-creator or ~/.agents/skills/page-creator

Manual copy (optional)

From your app root:

mkdir -p .cursor/skills
cp -R node_modules/@doreamonjs/page-creator/skills/page-creator .cursor/skills/

Repeat for .claude/skills, .gemini/skills, .agents/skills if needed. With pnpm, resolve the real package path under .pnpm/ if the package is not hoisted.

Do not put custom skills in ~/.cursor/skills-cursor/ — that area is for Cursor’s built-in skills.

Using the skill in Cursor

  1. Reload the Cursor window after installing, so skills are picked up.
  2. In Chat / Composer, @-mention the skill (**page-creator** in SKILL.md frontmatter — e.g. @page-creator). disable-model-invocation: true means you usually must attach it explicitly unless you change your local copy.
  3. Full manifest typings: node_modules/@doreamonjs/page-creator/lib/manifest.d.ts.

Other agents

Claude Code / Gemini CLI use the same copied folder; install paths are listed above. Reload or restart the CLI after install-skill if skills do not appear.

Core APIs

  • createManifest(manifest) - normalize manifest input
  • compileManifest(manifest, options?) - compile manifest into runtime Config
  • createModel(manifest) - create Dva model from compiled config
  • createModelWithCompileOptions(manifest, options?) - model creation with compile options
  • createPage(namespace, options?) - create page component

Phase-based refactor extensions

Validation

  • validateManifest(manifest) performs lightweight structural checks
  • validateManifest(manifest, { strict: true }) enables reference checks
  • Throws ManifestValidationError with structured issues:
    • code
    • path
    • message

Strict mode currently validates:

  • action pipeline service.api string references
  • action pipelineTo.action target references
  • field ui.search.options.api references
  • field ui.form.options.api references

Extensibility registries

  • registerFormFieldNormalizer(type, normalizer)
  • registerSearchFieldNormalizer(type, normalizer)
  • registerTableColumnNormalizer(type, normalizer)
  • registerPipelineHandler(stepType, handler)
  • registerPreset(preset) / applyPreset(nameOrPreset) / listPresets()
  • enterprisePreset (built-in example preset)

These APIs are backward-compatible: existing manifests continue to work without registration.

Preset usage example

import {
  registerPreset,
  applyPreset,
  enterprisePreset,
} from '@doreamonjs/page-creator';

registerPreset(enterprisePreset);
applyPreset('enterprise');

You can also apply a custom inline preset:

applyPreset({
  name: 'custom',
  formFieldNormalizers: {
    'my-type': (field) => ({ ...field, placeholder: 'customized' }),
  },
});

Pipeline compile options

compileManifest and createModelWithCompileOptions support:

  • pipeline.context.resolveDialogRender(name) to avoid hard window coupling
  • pipeline.hooks.beforeEachStep(step, action)
  • pipeline.hooks.afterEachStep(step, action)
  • validation.strict for strict manifest reference validation

Conditional Form Rules (when/then/else)

ManifestField.ui.form now supports declarative linkage rules:

  • when: condition group (all and/or any)
  • then: branch applied when when is matched
  • else: branch applied when when is not matched

Supported branch controls:

  • visible - show/hide field
  • required - toggle required validation
  • initialValue - set field value when current value is empty
  • options - replace options dynamically (useful for select/cascader)

Supported condition operators:

  • eq, ne
  • in, notIn
  • exists
  • regexp

Example: province-city linkage

const manifest = {
  path: '/orders',
  title: '订单',
  fields: [
    {
      key: 'region',
      title: '区域',
      type: 'string',
      ui: {
        form: {
          type: 'select',
          options: [
            { label: '中国', value: 'cn' },
            { label: '海外', value: 'global' },
          ],
        },
      },
    },
    {
      key: 'city',
      title: '城市',
      type: 'string',
      ui: {
        form: {
          type: 'select',
          when: {
            all: [{ key: 'region', eq: 'cn' }],
          },
          then: {
            visible: true,
            required: true,
            initialValue: 'hangzhou',
            options: [
              { label: '杭州', value: 'hangzhou' },
              { label: '上海', value: 'shanghai' },
            ],
          },
          else: {
            visible: false,
            required: false,
          },
        },
      },
    },
  ],
};

Example: condition with any + regexp

{
  key: 'contact',
  title: '联系人',
  type: 'string',
  ui: {
    form: {
      when: {
        any: [
          { key: 'scene', in: ['prod', 'pre'] },
          { key: 'namespace', regexp: '^team-' },
        ],
      },
      then: { required: true, visible: true },
      else: { required: false, visible: false },
    },
  },
}

Notes

  • Current validation is intentionally lightweight to avoid breaking legacy manifests.
  • Future phases can introduce stricter schema checks incrementally.

Test commands

  • yarn test - run both groups (test:unit + test:contract)
  • yarn test:unit - unit tests with coverage threshold
  • yarn test:contract - manifest->config contract snapshots (fixtures-based, no coverage)

Manifest lint CLI

After build, run:

yarn build
yarn lint:manifest ./manifests --strict --compile

Options:

  • --strict: enable strict reference checks
  • --compile: also run compile stage checks
  • --format pretty|json: output style
  • --ext .json,.manifest.json: file suffix list (comma-separated)
  • --ignore node_modules,dist,.git: skip paths containing these segments
  • --config ./.manifestlintrc: load config from file (CLI flags override config)

Config auto-discovery (from current directory upward):

  • .manifestlintrc
  • .manifestlintrc.json
  • manifestlint.config.json

Example config:

{
  "strict": true,
  "compile": true,
  "format": "pretty",
  "ext": [".json", ".manifest.json"],
  "ignore": ["node_modules", "dist"],
  "targets": ["./manifests"]
}

CI example

yarn build
yarn lint:manifest ./manifests --strict --compile --format pretty --ignore node_modules,dist