Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Apr 9, 2023
1 parent 82630f8 commit 079302a
Show file tree
Hide file tree
Showing 10 changed files with 122 additions and 22 deletions.
98 changes: 97 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"name": "minio",
"version": "7.0.34",
"description": "S3 Compatible Cloud Storage client",
"main": "./dist/main/minio.js",
"source": "./src/main/minio.mjs",
"main": "./dist/cjs/minio.cjs",
"module": "./dist/esm/minio.mjs",
"scripts": {
"format": "prettier -w .",
"format-check": "prettier --list-different .",
Expand Down Expand Up @@ -71,6 +73,7 @@
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.10",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-typescript": "^11.1.0",
"@types/lodash": "^4.14.192",
Expand All @@ -80,6 +83,7 @@
"babelify": "^10.0.0",
"browserify": "^16.5.2",
"chai": "^4.2.0",
"dotenv": "^16.0.3",
"eslint": "^8.37.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
Expand All @@ -95,6 +99,7 @@
"mocha-steps": "^1.1.0",
"nock": "^13.2.2",
"prettier": "^2.8.7",
"rollup-plugin-node-externals": "^5.1.2",
"source-map-support": "^0.5.13",
"split-file": "^2.2.2",
"superagent": "^8.0.9",
Expand Down
6 changes: 3 additions & 3 deletions rollup.config.cjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
const path = require('path')

const { getBabelOutputPlugin } = require('@rollup/plugin-babel')

const typescript = require('@rollup/plugin-typescript')
const replace = require('@rollup/plugin-replace')
const externals = require('rollup-plugin-node-externals')
const { nodeResolve } = require('@rollup/plugin-node-resolve')

const pkg = require('./package.json')

module.exports = {
input: './src/main/minio.mjs',
input: pkg.source,
plugins: [
nodeResolve({ extensions: ['.mjs', '.js', '.ts', '.mts', '.json', '.node'] }),
getBabelOutputPlugin({ presets: ['@babel/preset-env'] }),
externals({ builtinsPrefix: 'strip' }),
typescript({
Expand Down
4 changes: 2 additions & 2 deletions src/main/extensions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import Stream from 'stream'

import * as errors from './errors.js'
import { isBoolean, isNumber, isString, isValidBucketName, isValidPrefix, pipesetup, uriEscape } from './helpers.js'
import * as errors from './errors'
import { isBoolean, isNumber, isString, isValidBucketName, isValidPrefix, pipesetup, uriEscape } from './helpers'
import * as transformers from './transformers'

export default class extensions {
Expand Down
2 changes: 1 addition & 1 deletion src/main/helpers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import path from 'path'
import querystring from 'query-string'
import stream from 'stream'

import * as errors from './errors.js'
import * as errors from './errors'

const fxp = new XMLParser()

Expand Down
8 changes: 4 additions & 4 deletions src/main/minio.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Xml from 'xml'
import xml2js from 'xml2js'

import CredentialProvider from './CredentialProvider'
import * as errors from './errors.js'
import * as errors from './errors'
import extensions from './extensions'
import {
calculateEvenSplits,
Expand Down Expand Up @@ -71,11 +71,11 @@ import {
toSha256,
uriEscape,
uriResourceEscape,
} from './helpers.js'
} from './helpers'
import { NotificationConfig, NotificationPoller } from './notification'
import ObjectUploader from './object-uploader'
import { getS3Endpoint } from './s3-endpoints.js'
import { postPresignSignatureV4, presignSignatureV4, signV4 } from './signing.js'
import { getS3Endpoint } from './s3-endpoints'
import { postPresignSignatureV4, presignSignatureV4, signV4 } from './signing'
import * as transformers from './transformers'
import { parseSelectObjectContentResponse } from './xml-parsers'

Expand Down
2 changes: 1 addition & 1 deletion src/main/s3-endpoints.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { isString } from './helpers.js'
import { isString } from './helpers'

// List of currently supported endpoints.
let awsS3Endpoint = {
Expand Down
4 changes: 2 additions & 2 deletions src/main/signing.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import Crypto from 'crypto'
import _ from 'lodash'

import * as errors from './errors.js'
import { getScope, isArray, isNumber, isObject, isString, makeDateLong, makeDateShort, uriEscape } from './helpers.js'
import * as errors from './errors'
import { getScope, isArray, isNumber, isObject, isString, makeDateLong, makeDateShort, uriEscape } from './helpers'

const signV4Algorithm = 'AWS4-HMAC-SHA256'

Expand Down
6 changes: 3 additions & 3 deletions src/main/transformers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import JSONParser from 'json-stream'
import * as _ from 'lodash'
import Through2 from 'through2'

import * as errors from './errors.js'
import { isFunction } from './helpers.js'
import * as xmlParsers from './xml-parsers.js'
import * as errors from './errors'
import { isFunction } from './helpers'
import * as xmlParsers from './xml-parsers'

// getConcater returns a stream that concatenates the input and emits
// the concatenated output when 'end' has reached. If an optional
Expand Down
7 changes: 3 additions & 4 deletions src/main/xml-parsers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { XMLParser } from 'fast-xml-parser'

const fxp = new XMLParser()
import crc32 from 'buffer-crc32'
import { XMLParser } from 'fast-xml-parser'
import _ from 'lodash'

import * as errors from './errors.mts'
import * as errors from './errors'
import {
isObject,
parseXml,
Expand All @@ -31,6 +29,7 @@ import {
toArray,
} from './helpers'
// Parse XML and return information as Javascript types
const fxp = new XMLParser()

// parse error XML response
export function parseError(xml, headerInfo) {
Expand Down

0 comments on commit 079302a

Please sign in to comment.