Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

@dtsgenerator/replace-namespace

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dtsgenerator/replace-namespace

replace the namespace names

latest
Source
npmnpm
Version
1.7.0
Version published
Maintainers
1
Created
Source

@dtsgenerator/replace-namespace

This is the dtsgenerator plugin. Replace matched namespace identifiers by configuration.

Install

npm install @dtsgenerator/replace-namespace

Usage

dtsgen.json

{
    "plugins": {
        "@dtsgenerator/replace-namespace": {
            "map": [
                {
                    "from": ["path1", "path2"],
                    "to": ["replaced"]
                }
            ]
        }
    }
}

Configuration

  • the type of configuration
type Config = {
    map: {
        from: (string | boolean)[];
        to: string[];
    }[];
};
keytypedescription
mapArray of objectthe mapping of replacing.
map.n.fromArray<string | boolean>the definition of from name. if this value is true, it treated as wildcard .
map.n.toArray<string | boolean>the definition of to name.

Example

  • Example1
{
  "map": [
    {
      "from": ["Components", "Schemas"],
      "to": ["Test", "PetStore"]
    },
    {
      "from": ["Paths"],
      "to": ["Test", "PetStore"]
    }
  ]
}
  • Example2
{
  "map": [
    {
      "from": [true, "Schemas"],
      "to": ["Test"]
    }
  ]
}
  • Example3 Remove nested namespaces.
{
  "map": [
    {
      "from": [true, true, true],
      "to": []
    }
  ]
}

Keywords

dtsgenerator

FAQs

Package last updated on 19 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts