Tedious: μ΅œμ‹  ꡬ성 μŠ€ν‚€λ§ˆλ‘œ λ¬Έμ„œλ₯Ό μ—…λ°μ΄νŠΈν•˜μ‹­μ‹œμ˜€.

에 λ§Œλ“  2019λ…„ 02μ›” 02일  Β·  5μ½”λ©˜νŠΈ  Β·  좜처: tediousjs/tedious

이것은 μ €μž₯μ†Œμ˜ 예제λ₯Ό μ‚¬μš©ν•˜μ—¬ 얻은 κ²½κ³ μž…λ‹ˆλ‹€.

tedious deprecated "config.userName" 속성은 더 이상 μ‚¬μš©λ˜μ§€ μ•ŠμœΌλ©° ν–₯ν›„ μ§€λ£¨ν•œ λ²„μ „μ—μ„œλŠ” 더 이상 μ§€μ›ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λŒ€μ‹  μƒˆλ‘œμš΄ "config.authentication" 속성을 μ‚¬μš©ν•˜λ„λ‘ μ „ν™˜ν•˜μ‹­μ‹œμ˜€. src/μ„œλ²„/λͺ¨λΈ/μœ ν‹Έλ¦¬ν‹°/AzureSQL.js:36:25

"config.authentication"을 μ‚¬μš©ν•˜λŠ” μ΅œμ‹  ꡬ성 μŠ€ν‚€λ§ˆλ‘œ λ¬Έμ„œλ₯Ό μ—…λ°μ΄νŠΈν•˜μ‹­μ‹œμ˜€.

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

@pranaytanniru ν˜„μž¬ λ¬Έμ„œμ˜ μ•½κ°„μ˜ λ‹¨μ μž…λ‹ˆλ‹€.

λ‹€μŒμ€ authentication 속성을 μ‚¬μš©ν•˜λŠ” κ΅¬μ„±μ˜ μ˜ˆμž…λ‹ˆλ‹€.

{
  "server": "localhost",
  "authentication": {
    "type": "default",
    "options": {
      "userName": "sa",
      "password": "yourStrong(!)Password",
    }
  },
  "options": {
    "port": 1433,
    "database": "master"
  }
}

λͺ¨λ“  5 λŒ“κΈ€

@yianni-ververis μƒˆλ‘œμš΄ ꡬ성 μ˜΅μ…˜μ— λŒ€ν•œ λ¬Έμ„œκ°€ http://tediousjs.github.io/tedious/api-connection.html 에 μ—…λ°μ΄νŠΈλ˜μ—ˆμŠ΅λ‹ˆλ‹€. κ°œμ„ μ„ μœ„ν•œ λͺ¨λ“  ν”Όλ“œλ°±μ„ μ§„μ‹¬μœΌλ‘œ ν™˜μ˜ν•©λ‹ˆλ‹€ πŸ™

config κ°œμ²΄κ°€ μ–΄λ–»κ²Œ μƒκ²ΌλŠ”μ§€μ— λŒ€ν•œ μ˜ˆλŠ” μ—†μŠ΅λ‹ˆλ‹€.

@pranaytanniru ν˜„μž¬ λ¬Έμ„œμ˜ μ•½κ°„μ˜ λ‹¨μ μž…λ‹ˆλ‹€.

λ‹€μŒμ€ authentication 속성을 μ‚¬μš©ν•˜λŠ” κ΅¬μ„±μ˜ μ˜ˆμž…λ‹ˆλ‹€.

{
  "server": "localhost",
  "authentication": {
    "type": "default",
    "options": {
      "userName": "sa",
      "password": "yourStrong(!)Password",
    }
  },
  "options": {
    "port": 1433,
    "database": "master"
  }
}

login failed for user '' μ™Έμ—λŠ” 였λ₯˜ λ©”μ‹œμ§€κ°€ ν‘œμ‹œλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

Typescriptλ₯Ό μ‚¬μš©ν•˜κ³  μžˆμ—ˆλŠ”λ° @types/tedious μ •μ˜κ°€ μ˜€λž˜λ˜μ—ˆκ³  인증 κ°œμ²΄μ— λŒ€ν•œ μΈν„°νŽ˜μ΄μŠ€ μ •μ˜κ°€ ν¬ν•¨λ˜μ§€ μ•Šμ€ κ²ƒμœΌλ‘œ λ‚˜νƒ€λ‚¬μŠ΅λ‹ˆλ‹€. 이 문제λ₯Ό ν•΄κ²°ν•˜κΈ° μœ„ν•΄ DefinedTyped ν”„λ‘œμ νŠΈμ— PR을 μ œμΆœν–ˆμŠ΅λ‹ˆλ‹€.

μ—°κ²° ꡬ성 μ˜΅μ…˜μ˜ 전체 λͺ©λ‘μ€ tedious/src/connection.jsμ—μ„œ ꡬ성 개체λ₯Ό μ„€μ •ν•˜λŠ” μƒμ„±μžλ₯Ό ν™•μΈν•˜μ„Έμš”.

예,

const authentication = {
        type: 'default',
        options: {
          userName: ...,
          password: ...
        }
      };

const config = {
      server: config.server,
      authentication: authentication,
      options: {
        abortTransactionOnError: false,
        appName: undefined,
        camelCaseColumns: false,
        cancelTimeout: DEFAULT_CANCEL_TIMEOUT,
        columnNameReplacer: undefined,
        connectionRetryInterval: DEFAULT_CONNECT_RETRY_INTERVAL,
        connectTimeout: DEFAULT_CONNECT_TIMEOUT,
        connectionIsolationLevel: ISOLATION_LEVEL.READ_COMMITTED,
        cryptoCredentialsDetails: {},
        database: undefined,
        datefirst: DEFAULT_DATEFIRST,
        dateFormat: DEFAULT_DATEFORMAT,
        debug: {
          data: false,
          packet: false,
          payload: false,
          token: false
        },
        enableAnsiNull: true,
        enableAnsiNullDefault: true,
        enableAnsiPadding: true,
        enableAnsiWarnings: true,
        enableArithAbort: false,
        enableConcatNullYieldsNull: true,
        enableCursorCloseOnCommit: null,
        enableImplicitTransactions: false,
        enableNumericRoundabort: false,
        enableQuotedIdentifier: true,
        encrypt: false,
        fallbackToDefaultDb: false,
        instanceName: undefined,
        isolationLevel: ISOLATION_LEVEL.READ_COMMITTED,
        language: DEFAULT_LANGUAGE,
        localAddress: undefined,
        maxRetriesOnTransientErrors: 3,
        multiSubnetFailover: false,
        packetSize: DEFAULT_PACKET_SIZE,
        port: DEFAULT_PORT,
        readOnlyIntent: false,
        requestTimeout: DEFAULT_CLIENT_REQUEST_TIMEOUT,
        rowCollectionOnDone: false,
        rowCollectionOnRequestCompletion: false,
        tdsVersion: DEFAULT_TDS_VERSION,
        textsize: DEFAULT_TEXTSIZE,
        trustServerCertificate: true,
        useColumnNames: false,
        useUTC: true
      }
    };
이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰