@servicenow/sdk - v4.14.3
    Preparing search index...

    Implements

    Index

    Constructors

    • Parameters

      • Optional__namedParameters: {
            committer?: ICommitter;
            compiler?: Compiler;
            compilerOptions?: tsc.CompilerOptions;
            config?: Partial<
                {
                    accessControls?: {
                        canEditInStudio?: boolean;
                        hideOnUI?: boolean;
                        private?: boolean;
                        restrictTableAccess?: boolean;
                        runtimeAccessTracking?: string;
                        scopedAdministration?: boolean;
                        trackable?: boolean;
                        uninstallBlocked?: boolean;
                        userRole?: string;
                    };
                    active?: boolean;
                    applicationRuntimePolicy?: "none"
                    | "tracking"
                    | "enforcing";
                    appOutputDir?: string;
                    clientDir?: string;
                    compileOutputDir?: string;
                    defaultLanguage?: string;
                    dependencies?:
                        | Record<
                            string,
                            {
                                roles?: string[]
                                | "*";
                                tables?: string[] | "*";
                                [key: string]: string[] | "*";
                            },
                        >
                        | {
                            applications: ZodRecord<
                                ZodString,
                                ZodObject<{ tables: ZodOptional<(...)> }, $strip>,
                            >;
                        };
                    description?: string;
                    emitDictionary?: boolean;
                    excludeFilePatterns?: string[];
                    fluentDir?: string;
                    generatedDir?: string;
                    guidedSetupGuid?: string;
                    hostedPlugins?: Record<string, string>;
                    ideCreated?: string;
                    ignoreTransformTableList?: string[];
                    installAs?: "custom" | "store";
                    installedAsDependency?: boolean;
                    jsLevel?: string;
                    legacyChoices?: boolean;
                    licensing?: {
                        enforceLicense?: string;
                        licensable?: boolean;
                        licenseCategory?: string;
                        licenseModel?: string;
                        subscriptionEntitlement?: string;
                    };
                    linter?: { module: { enabled?: boolean } };
                    logo?: string;
                    menu?: string;
                    metadataDir?: string;
                    moduleDir?: string;
                    modulePaths?: Record<string, string>;
                    name?: string;
                    networkPolicies?: {
                        $id?: string;
                        active?: boolean;
                        host?: string;
                        path?: string[];
                        policyType:
                            | "csp_script_src"
                            | "csp_connect_src"
                            | "now_inbound_scoped"
                            | "now_inbound_global"
                            | "now_outbound";
                        resource?: string;
                        scheme?: "http"
                        | "https"
                        | "ws"
                        | "wss";
                        shortDescription?: string;
                        status: "requested" | "allowed" | "denied";
                    }[];
                    npmUpdateCheck?: number
                    | false;
                    packageResolverVersion?: string;
                    packageSourceCodeOnInstance?: boolean;
                    packOutputDir?: string;
                    performancePolicy?: {
                        $id?: string;
                        apiTransactionLimit?: number;
                        eventHandlerLimit?: number;
                        interactiveTransactionLimit?: number;
                        mode?: "disabled" | "enforced" | "logOnly";
                        name: string;
                        scheduledJobLimit?: number;
                    };
                    scope: string;
                    scopeId: string;
                    scripts?: Record<string, string>;
                    serverModulesDir?: string;
                    serverModulesExcludePatterns?: string[];
                    serverModulesIncludePatterns?: string[];
                    snManaged?: boolean;
                    sourceDir?: string;
                    sourceMap?: boolean;
                    staticContent?: {
                        assets?: Record<string, { publicPath: string }>;
                        buildDir?: string;
                        paths?: Record<string, string>;
                    };
                    staticContentDir?: string;
                    staticContentPaths?: Record<string, string>;
                    sysCode?: string;
                    tableDefaultLanguage?: string;
                    tableOutputFormat?: "component" | "bootstrap";
                    taxonomy?: {
                        fallbackFolderName?: string;
                        mapping?: { [key: string]: string | undefined };
                    };
                    transpiledSourceDir?: string;
                    trustedModules?: string[];
                    tsconfigPath?: string;
                    type?: "configuration"
                    | "package";
                    typesDir?: string;
                    vendor?: string;
                    vendorPrefix?: string;
                    wildcardPolicy?: {
                        $id?: string;
                        active?: boolean;
                        arl?: { active?: boolean; arlWildcard?: (...)[] };
                        network?: { active?: boolean; networkWildcard?: (...)[] };
                        record?: boolean;
                        scripting?: { active?: boolean; scriptingWildcard?: (...)[] };
                        shortDescription?: string;
                    };
                },
            >;
            diagnostics?: Diagnostics;
            factory?: Factory;
            fileSystem?: FileSystem;
            inspector?: IInspector;
            keys?: Keys;
            logger?: Logger;
            packageJson?: Package;
            parser?: Parser;
            plugins?: Plugin[]
            | Plugins;
            rootDir?: string;
            sourceFilePaths?: string[];
            targeter?: ITargeter;
            telemetryClient?: Telemetry;
            transform?: Transform;
            transformMode?: "transform" | "type-generation";
        }

      Returns Project

    Methods

    • Parameters

      • file: File
      • Optionaloptions: { excludeFromCompiler?: boolean; resolveDependencies?: boolean }

      Returns ProjectFile

    • Parameters

      • path: string
      • Optionaloptions: { excludeFromCompiler?: boolean; resolveDependencies?: boolean }

      Returns ProjectFile

    • Parameters

      • path: string

      Returns void

    • Returns void

    • Parameters

      • name: string

      Returns ProjectFile | undefined

    • Parameters

      Returns ProjectFile | undefined

    • Cleans up source files so they compile: adds plugin-declared imports, resolves remaining missing imports, deletes unused code and fixes trailing commas. Each step runs batched across files (every project file by default) rather than file by file, so the language service is only refreshed once per step. transform() calls this with the files it changed.

      Parameters

      Returns Promise<void[]>

    • Returns Promise<void[]>

    • Returns ApiUsageCollector

    • Returns Compiler

    • Returns {
          accessControls?: {
              canEditInStudio?: boolean;
              hideOnUI?: boolean;
              private?: boolean;
              restrictTableAccess?: boolean;
              runtimeAccessTracking?: string;
              scopedAdministration?: boolean;
              trackable?: boolean;
              uninstallBlocked?: boolean;
              userRole?: string;
          };
          active?: boolean;
          applicationRuntimePolicy: "none"
          | "tracking"
          | "enforcing";
          appOutputDir: string;
          clientDir: string;
          compileOutputDir?: string;
          defaultLanguage: string;
          dependencies?:
              | {
                  applications: ZodRecord<
                      ZodString,
                      ZodObject<{ tables: ZodOptional<ZodArray<ZodString>> }, $strip>,
                  >;
              }
              | Record<
                  string,
                  {
                      roles?: string[]
                      | "*";
                      tables?: string[] | "*";
                      [key: string]: string[] | "*";
                  },
              >;
          description?: string;
          emitDictionary: boolean;
          excludeFilePatterns: string[];
          fluentDir: string;
          generatedDir: string;
          guidedSetupGuid?: string;
          hostedPlugins?: Record<string, string>;
          ideCreated?: string;
          ignoreTransformTableList: string[];
          installAs: "custom" | "store";
          installedAsDependency?: boolean;
          jsLevel?: string;
          legacyChoices: boolean;
          licensing?: {
              enforceLicense?: string;
              licensable?: boolean;
              licenseCategory?: string;
              licenseModel?: string;
              subscriptionEntitlement?: string;
          };
          linter: { module: { enabled: boolean } };
          logo?: string;
          menu?: string;
          metadataDir: string;
          moduleDir?: string;
          modulePaths: ZodDefault<ZodRecord<ZodString, ZodString>>;
          name?: string;
          networkPolicies?: {
              $id?: string;
              active: boolean;
              host?: string;
              path?: string[];
              policyType:
                  | "csp_script_src"
                  | "csp_connect_src"
                  | "now_inbound_scoped"
                  | "now_inbound_global"
                  | "now_outbound";
              resource?: string;
              scheme?: "http"
              | "https"
              | "ws"
              | "wss";
              shortDescription?: string;
              status: "requested" | "allowed" | "denied";
          }[];
          npmUpdateCheck: number
          | false;
          packageResolverVersion?: string;
          packageSourceCodeOnInstance: boolean;
          packOutputDir: string;
          performancePolicy?: {
              $id?: string;
              apiTransactionLimit?: number;
              eventHandlerLimit?: number;
              interactiveTransactionLimit?: number;
              mode?: "disabled" | "enforced" | "logOnly";
              name: string;
              scheduledJobLimit?: number;
          };
          scope: string;
          scopeId: string;
          scripts: ZodDefault<ZodRecord<ZodString, ZodString>>;
          serverModulesDir: string;
          serverModulesExcludePatterns: string[];
          serverModulesIncludePatterns: string[];
          snManaged: boolean;
          sourceDir?: string;
          sourceMap?: boolean;
          staticContent: {
              assets: ZodDefault<
                  ZodRecord<ZodString, ZodObject<{ publicPath: ZodString }, $strip>>,
              >;
              buildDir: string;
              paths: ZodDefault<ZodRecord<ZodString, ZodString>>;
          };
          staticContentDir: string;
          staticContentPaths: ZodDefault<ZodRecord<ZodString, ZodString>>;
          sysCode?: string;
          tableDefaultLanguage?: string;
          tableOutputFormat?: "component" | "bootstrap";
          taxonomy: { fallbackFolderName: string; mapping: Record<string, string> };
          transpiledSourceDir?: string;
          trustedModules: string[];
          tsconfigPath?: string;
          type: "configuration" | "package";
          typesDir: string;
          vendor?: string;
          vendorPrefix?: string;
          wildcardPolicy?: {
              $id?: string;
              active: boolean;
              arl?: {
                  active: boolean;
                  arlWildcard?: (
                      | "scheduled_job_limit"
                      | "event_handler"
                      | "api_transaction_limit"
                      | "interactive_transaction_limit"
                  )[];
              };
              network?: {
                  active: boolean;
                  networkWildcard?: (
                      | "csp_script_src"
                      | "csp_connect_src"
                      | "now_inbound_scoped"
                      | "now_inbound_global"
                      | "now_outbound"
                  )[];
              };
              record: boolean;
              scripting?: {
                  active: boolean;
                  scriptingWildcard?: ("sys_script_include" | "scriptable")[];
              };
              shortDescription?: string;
          };
      }

    • Returns FullContext

    • Returns Promise<Diagnostic[]>

    • Returns Diagnostics

    • Returns Promise<ProjectFile[]>

    • Returns Factory

    • Parameters

      • path: string

      Returns ProjectFile

    • Parameters

      • path: string

      Returns ProjectFile | undefined

    • Returns ProjectFile[]

    • Returns FileSystem

    • Returns string

    • Returns string

    • Returns Keys

    • Returns Logger

    • Returns string

    • Parameters

      • OptionalsysIds: Set<string>
      • OptionalerrorOnConflict: boolean
      • OptionalbuildId: string

      Returns Promise<File[]>

    • Returns Package

    • Returns Plugins

    • Parameters

      • OptionalsysIds: Set<string>
      • OptionalerrorOnConflict: boolean

      Returns Promise<Database>

    • Returns string

    • Returns string

    • Returns Telemetry

    • Returns Transform

    • Parameters

      Returns ProjectFile

    • True when both paths live under conditional directories but belong to different conditional plugins (if/ or hosted_plugins/). These records deliver to separate plugins and must be treated as distinct even when they share a sys_id, so the incoming one is preserved as metadata XML rather than merged into the already-seen record.

      Parameters

      • pathA: string
      • pathB: string

      Returns boolean

    • Parameters

      • path: string

      Returns boolean

    • Parameters

      • dir: string
      • path: string

      Returns boolean

    • Parameters

      • path: string

      Returns boolean

    • Parameters

      • path: string
      • OptionalpluginId: string

      Returns boolean

    • Parameters

      • path: string

      Returns boolean

    • Parameters

      • path: string

      Returns boolean

    • Parameters

      • path: string

      Returns boolean

    • Parameters

      • path: string

      Returns boolean

    • Parameters

      • path: string

      Returns boolean

    • Returns boolean

    • Parameters

      Returns string

    • Parameters

      • table: string
      • key: string | number
      • OptionalguidOverride: string

      Returns string

    • Parameters

      • ...paths: string[]

      Returns string

    • Parameters

      • path: string
      • OptionalrefreshFromFileSystem: boolean

      Returns ProjectFile[]

    • Parameters

      • path: string
      • OptionalrefreshFromFileSystem: boolean

      Returns ProjectFile

    • Parameters

      Returns void

    • Parameters

      • path: string

      Returns void

    • Parameters

      • ...paths: string[]

      Returns string

    • Parameters

      Returns { scope?: string; scopeId: string }

    • Returns void

    • Parameters

      • OptionalsysIds: Set<string>
      • OptionalerrorOnConflict: boolean
      • OptionalbuildId: string
      • OptionalsourceMap: boolean

      Returns Promise<File[]>

    • Parameters

      Returns Promise<TransformResult>