Skip to content

[Feature Request] ignore variables generateTypes #456

@danciudev

Description

@danciudev

Description

When using the Vite plugin and autogenerating type definitions with generateTypes, I want to be able to disable certain variables that I use for my development tools, for example, CODE_EDITOR:

# @defaultSensitive=inferFromPrefix('VITE_')
# @generateTypes(lang=ts, path=./typings/env.d.ts)
# @redactLogs=false
# ---

# ──────────────────────────────────────────
# Deployment
# ──────────────────────────────────────────

# The environment you want to use, is used in the apis requests
# @required @type=enum(local, dev, prod, staging)
VITE_DEPLOYMENT_ENV="local"

# ──────────────────────────────────────────
# Azure
# ──────────────────────────────────────────

# @required @type=url
VITE_AZURE_AD_AUTHORITY=

# @required @type=azureClientId
VITE_AZURE_AD_CLIENT_ID=

# @required @type=string
VITE_AZURE_AD_ENRICHMENT_SCOPES=

# Redirect URL after login, only needed for local development, in production it will be determined by the hosting environment
# @optional @type=url
VITE_AZURE_AD_REDIRECT_URL=

# Application Insights connection string for telemetry
# @required @type=string
VITE_AZURE_APPINSIGHTS_CONNECTION_STRING=

# Only for WSL: Example: /home/xxx/.vscode-server/bin/xxx/bin/remote-cli/code
# @optional @type=string
# @docs(https://inspector.fe-dev.cn/more/question.html#%E5%9C%A8-wsl-%E5%92%8C-dev-containers-%E4%B8%AD%E4%BD%BF%E7%94%A8)
CODE_EDITOR=

Motivation

With the current behavior, it automatically adds it to the env.d.ts file

Proposed Solution

Two options:

  • Add a new @ignoreType tag
  • Extend generateTypes and allow an array of ignored variables

Alternatives

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions