ali-skills 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@ali/cli-skills/dist/cli.mjs +1214 -287
- package/node_modules/@ali/cli-skills/package.json +5 -2
- package/node_modules/@ali/o2-open-client/.editorconfig +11 -0
- package/node_modules/@ali/o2-open-client/README.md +80 -0
- package/node_modules/@ali/o2-open-client/abc.json +8 -0
- package/node_modules/@ali/o2-open-client/es/browser/ee.d.ts +23 -0
- package/node_modules/@ali/o2-open-client/es/browser/ee.js +82 -0
- package/node_modules/@ali/o2-open-client/es/browser/entry.d.ts +32 -0
- package/node_modules/@ali/o2-open-client/es/browser/entry.js +306 -0
- package/node_modules/@ali/o2-open-client/es/browser/escape.d.ts +12 -0
- package/node_modules/@ali/o2-open-client/es/browser/escape.js +178 -0
- package/node_modules/@ali/o2-open-client/es/browser/fetch.d.ts +1 -0
- package/node_modules/@ali/o2-open-client/es/browser/fetch.js +14 -0
- package/node_modules/@ali/o2-open-client/es/browser/index.d.ts +1 -0
- package/node_modules/@ali/o2-open-client/es/browser/index.js +1 -0
- package/node_modules/@ali/o2-open-client/es/common/constant.d.ts +42 -0
- package/node_modules/@ali/o2-open-client/es/common/constant.js +53 -0
- package/node_modules/@ali/o2-open-client/es/common/format.d.ts +14 -0
- package/node_modules/@ali/o2-open-client/es/common/format.js +43 -0
- package/node_modules/@ali/o2-open-client/es/common/service-meta.d.ts +33 -0
- package/node_modules/@ali/o2-open-client/es/common/service-meta.js +33 -0
- package/node_modules/@ali/o2-open-client/es/index.d.ts +1 -0
- package/node_modules/@ali/o2-open-client/es/index.js +8 -0
- package/node_modules/@ali/o2-open-client/es/node/config.d.ts +47 -0
- package/node_modules/@ali/o2-open-client/es/node/config.js +188 -0
- package/node_modules/@ali/o2-open-client/es/node/escape.d.ts +22 -0
- package/node_modules/@ali/o2-open-client/es/node/escape.js +131 -0
- package/node_modules/@ali/o2-open-client/es/node/help.d.ts +10 -0
- package/node_modules/@ali/o2-open-client/es/node/help.js +96 -0
- package/node_modules/@ali/o2-open-client/es/node/index.d.ts +48 -0
- package/node_modules/@ali/o2-open-client/es/node/index.js +247 -0
- package/node_modules/@ali/o2-open-client/es/node/token-handler.d.ts +1 -0
- package/node_modules/@ali/o2-open-client/es/node/token-handler.js +21 -0
- package/node_modules/@ali/o2-open-client/lib/browser/ee.d.ts +23 -0
- package/node_modules/@ali/o2-open-client/lib/browser/ee.js +86 -0
- package/node_modules/@ali/o2-open-client/lib/browser/entry.d.ts +32 -0
- package/node_modules/@ali/o2-open-client/lib/browser/entry.js +310 -0
- package/node_modules/@ali/o2-open-client/lib/browser/escape.d.ts +12 -0
- package/node_modules/@ali/o2-open-client/lib/browser/escape.js +185 -0
- package/node_modules/@ali/o2-open-client/lib/browser/fetch.d.ts +1 -0
- package/node_modules/@ali/o2-open-client/lib/browser/fetch.js +18 -0
- package/node_modules/@ali/o2-open-client/lib/common/constant.d.ts +42 -0
- package/node_modules/@ali/o2-open-client/lib/common/constant.js +56 -0
- package/node_modules/@ali/o2-open-client/lib/common/format.d.ts +14 -0
- package/node_modules/@ali/o2-open-client/lib/common/format.js +48 -0
- package/node_modules/@ali/o2-open-client/lib/common/service-meta.d.ts +33 -0
- package/node_modules/@ali/o2-open-client/lib/common/service-meta.js +36 -0
- package/node_modules/@ali/o2-open-client/lib/index.d.ts +1 -0
- package/node_modules/@ali/o2-open-client/lib/index.js +20 -0
- package/node_modules/@ali/o2-open-client/lib/node/config.d.ts +47 -0
- package/node_modules/@ali/o2-open-client/lib/node/config.js +192 -0
- package/node_modules/@ali/o2-open-client/lib/node/escape.d.ts +22 -0
- package/node_modules/@ali/o2-open-client/lib/node/escape.js +137 -0
- package/node_modules/@ali/o2-open-client/lib/node/help.d.ts +10 -0
- package/node_modules/@ali/o2-open-client/lib/node/help.js +100 -0
- package/node_modules/@ali/o2-open-client/lib/node/index.d.ts +48 -0
- package/node_modules/@ali/o2-open-client/lib/node/index.js +250 -0
- package/node_modules/@ali/o2-open-client/lib/node/token-handler.d.ts +1 -0
- package/node_modules/@ali/o2-open-client/lib/node/token-handler.js +25 -0
- package/node_modules/@ali/o2-open-client/package.json +46 -0
- package/node_modules/@ali/o2-open-client/playwright.config.ts +54 -0
- package/node_modules/@ali/o2-open-client/tsconfig.es.json +31 -0
- package/node_modules/@ali/o2-open-client/tsconfig.json +31 -0
- package/node_modules/@ali/o2-open-client/tsx2doc.config.js +5 -0
- package/node_modules/@ali/o2-open-client/typings/index.d.ts +36 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@types/node/assert.d.ts +1062 -0
- package/node_modules/@types/node/async_hooks.d.ts +605 -0
- package/node_modules/@types/node/buffer.buffer.d.ts +471 -0
- package/node_modules/@types/node/buffer.d.ts +1936 -0
- package/node_modules/@types/node/child_process.d.ts +1475 -0
- package/node_modules/@types/node/cluster.d.ts +577 -0
- package/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/node/console.d.ts +452 -0
- package/node_modules/@types/node/constants.d.ts +21 -0
- package/node_modules/@types/node/crypto.d.ts +4590 -0
- package/node_modules/@types/node/dgram.d.ts +597 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
- package/node_modules/@types/node/dns/promises.d.ts +479 -0
- package/node_modules/@types/node/dns.d.ts +871 -0
- package/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@types/node/events.d.ts +977 -0
- package/node_modules/@types/node/fs/promises.d.ts +1270 -0
- package/node_modules/@types/node/fs.d.ts +4375 -0
- package/node_modules/@types/node/globals.d.ts +172 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +38 -0
- package/node_modules/@types/node/http.d.ts +2049 -0
- package/node_modules/@types/node/http2.d.ts +2631 -0
- package/node_modules/@types/node/https.d.ts +578 -0
- package/node_modules/@types/node/index.d.ts +93 -0
- package/node_modules/@types/node/inspector.generated.d.ts +3966 -0
- package/node_modules/@types/node/module.d.ts +539 -0
- package/node_modules/@types/node/net.d.ts +1031 -0
- package/node_modules/@types/node/os.d.ts +506 -0
- package/node_modules/@types/node/package.json +140 -0
- package/node_modules/@types/node/path.d.ts +200 -0
- package/node_modules/@types/node/perf_hooks.d.ts +961 -0
- package/node_modules/@types/node/process.d.ts +1961 -0
- package/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/node/querystring.d.ts +152 -0
- package/node_modules/@types/node/readline/promises.d.ts +162 -0
- package/node_modules/@types/node/readline.d.ts +589 -0
- package/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@types/node/sea.d.ts +153 -0
- package/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/node_modules/@types/node/stream/web.d.ts +533 -0
- package/node_modules/@types/node/stream.d.ts +1698 -0
- package/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/node/test.d.ts +1787 -0
- package/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/node_modules/@types/node/timers.d.ts +286 -0
- package/node_modules/@types/node/tls.d.ts +1259 -0
- package/node_modules/@types/node/trace_events.d.ts +197 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +93 -0
- package/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@types/node/url.d.ts +964 -0
- package/node_modules/@types/node/util.d.ts +2331 -0
- package/node_modules/@types/node/v8.d.ts +809 -0
- package/node_modules/@types/node/vm.d.ts +1001 -0
- package/node_modules/@types/node/wasi.d.ts +181 -0
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
- package/node_modules/@types/node/worker_threads.d.ts +715 -0
- package/node_modules/@types/node/zlib.d.ts +598 -0
- package/node_modules/ansi-styles/index.d.ts +345 -0
- package/node_modules/ansi-styles/index.js +163 -0
- package/node_modules/ansi-styles/license +9 -0
- package/node_modules/ansi-styles/package.json +56 -0
- package/node_modules/ansi-styles/readme.md +152 -0
- package/node_modules/await-event/LICENSE +22 -0
- package/node_modules/await-event/README.md +48 -0
- package/node_modules/await-event/index.js +13 -0
- package/node_modules/await-event/package.json +33 -0
- package/node_modules/await-first/LICENSE +21 -0
- package/node_modules/await-first/README.md +80 -0
- package/node_modules/await-first/lib/index.js +21 -0
- package/node_modules/await-first/package.json +49 -0
- package/node_modules/byte/LICENSE.txt +21 -0
- package/node_modules/byte/README.md +207 -0
- package/node_modules/byte/lib/byte.js +635 -0
- package/node_modules/byte/lib/number.js +82 -0
- package/node_modules/byte/package.json +61 -0
- package/node_modules/chalk/index.d.ts +415 -0
- package/node_modules/chalk/license +9 -0
- package/node_modules/chalk/package.json +68 -0
- package/node_modules/chalk/readme.md +341 -0
- package/node_modules/chalk/source/index.js +229 -0
- package/node_modules/chalk/source/templates.js +134 -0
- package/node_modules/chalk/source/util.js +39 -0
- package/node_modules/circular-json-for-egg/LICENSE.txt +19 -0
- package/node_modules/circular-json-for-egg/README.md +148 -0
- package/node_modules/circular-json-for-egg/build/circular-json.amd.js +2 -0
- package/node_modules/circular-json-for-egg/build/circular-json.js +2 -0
- package/node_modules/circular-json-for-egg/build/circular-json.max.amd.js +210 -0
- package/node_modules/circular-json-for-egg/build/circular-json.max.js +210 -0
- package/node_modules/circular-json-for-egg/build/circular-json.node.js +207 -0
- package/node_modules/circular-json-for-egg/package.json +42 -0
- package/node_modules/cluster-client/LICENSE +21 -0
- package/node_modules/cluster-client/README.md +319 -0
- package/node_modules/cluster-client/index.js +66 -0
- package/node_modules/cluster-client/lib/api_client.js +74 -0
- package/node_modules/cluster-client/lib/connection.js +180 -0
- package/node_modules/cluster-client/lib/const.js +5 -0
- package/node_modules/cluster-client/lib/default_logger.js +11 -0
- package/node_modules/cluster-client/lib/default_transcode.js +6 -0
- package/node_modules/cluster-client/lib/follower.js +331 -0
- package/node_modules/cluster-client/lib/index.js +213 -0
- package/node_modules/cluster-client/lib/leader.js +437 -0
- package/node_modules/cluster-client/lib/protocol/byte_buffer.js +8 -0
- package/node_modules/cluster-client/lib/protocol/packet.js +103 -0
- package/node_modules/cluster-client/lib/protocol/request.js +17 -0
- package/node_modules/cluster-client/lib/protocol/response.js +14 -0
- package/node_modules/cluster-client/lib/server.js +256 -0
- package/node_modules/cluster-client/lib/symbol.js +20 -0
- package/node_modules/cluster-client/lib/utils.js +103 -0
- package/node_modules/cluster-client/lib/wrapper/base.js +210 -0
- package/node_modules/cluster-client/lib/wrapper/cluster.js +57 -0
- package/node_modules/cluster-client/lib/wrapper/single.js +192 -0
- package/node_modules/cluster-client/package.json +60 -0
- package/node_modules/co/LICENSE +22 -0
- package/node_modules/co/Readme.md +212 -0
- package/node_modules/co/index.js +237 -0
- package/node_modules/co/package.json +34 -0
- package/node_modules/color-convert/LICENSE +21 -0
- package/node_modules/color-convert/README.md +68 -0
- package/node_modules/color-convert/conversions.js +839 -0
- package/node_modules/color-convert/index.js +81 -0
- package/node_modules/color-convert/package.json +48 -0
- package/node_modules/color-convert/route.js +97 -0
- package/node_modules/color-name/LICENSE +8 -0
- package/node_modules/color-name/README.md +11 -0
- package/node_modules/color-name/index.js +152 -0
- package/node_modules/color-name/package.json +28 -0
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/README.md +3 -0
- package/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/core-util-is/package.json +38 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/depd/History.md +103 -0
- package/node_modules/depd/LICENSE +22 -0
- package/node_modules/depd/Readme.md +280 -0
- package/node_modules/depd/index.js +538 -0
- package/node_modules/depd/lib/browser/index.js +77 -0
- package/node_modules/depd/package.json +45 -0
- package/node_modules/ee-first/LICENSE +22 -0
- package/node_modules/ee-first/README.md +80 -0
- package/node_modules/ee-first/index.js +95 -0
- package/node_modules/ee-first/package.json +29 -0
- package/node_modules/egg-errors/LICENSE +21 -0
- package/node_modules/egg-errors/README.md +259 -0
- package/node_modules/egg-errors/lib/base.d.ts +10 -0
- package/node_modules/egg-errors/lib/base.js +28 -0
- package/node_modules/egg-errors/lib/base_error.d.ts +6 -0
- package/node_modules/egg-errors/lib/base_error.js +13 -0
- package/node_modules/egg-errors/lib/base_exception.d.ts +6 -0
- package/node_modules/egg-errors/lib/base_exception.js +13 -0
- package/node_modules/egg-errors/lib/error.d.ts +6 -0
- package/node_modules/egg-errors/lib/error.js +13 -0
- package/node_modules/egg-errors/lib/error_options.d.ts +5 -0
- package/node_modules/egg-errors/lib/error_options.js +6 -0
- package/node_modules/egg-errors/lib/error_type.d.ts +6 -0
- package/node_modules/egg-errors/lib/error_type.js +10 -0
- package/node_modules/egg-errors/lib/exception.d.ts +6 -0
- package/node_modules/egg-errors/lib/exception.js +13 -0
- package/node_modules/egg-errors/lib/framework/formatter.d.ts +6 -0
- package/node_modules/egg-errors/lib/framework/formatter.js +29 -0
- package/node_modules/egg-errors/lib/framework/framework_base_error.d.ts +10 -0
- package/node_modules/egg-errors/lib/framework/framework_base_error.js +32 -0
- package/node_modules/egg-errors/lib/http/400.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/400.js +13 -0
- package/node_modules/egg-errors/lib/http/401.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/401.js +13 -0
- package/node_modules/egg-errors/lib/http/402.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/402.js +13 -0
- package/node_modules/egg-errors/lib/http/403.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/403.js +13 -0
- package/node_modules/egg-errors/lib/http/404.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/404.js +13 -0
- package/node_modules/egg-errors/lib/http/405.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/405.js +13 -0
- package/node_modules/egg-errors/lib/http/406.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/406.js +13 -0
- package/node_modules/egg-errors/lib/http/407.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/407.js +13 -0
- package/node_modules/egg-errors/lib/http/408.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/408.js +13 -0
- package/node_modules/egg-errors/lib/http/409.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/409.js +13 -0
- package/node_modules/egg-errors/lib/http/410.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/410.js +13 -0
- package/node_modules/egg-errors/lib/http/411.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/411.js +13 -0
- package/node_modules/egg-errors/lib/http/412.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/412.js +13 -0
- package/node_modules/egg-errors/lib/http/413.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/413.js +13 -0
- package/node_modules/egg-errors/lib/http/414.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/414.js +13 -0
- package/node_modules/egg-errors/lib/http/415.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/415.js +13 -0
- package/node_modules/egg-errors/lib/http/416.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/416.js +13 -0
- package/node_modules/egg-errors/lib/http/417.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/417.js +13 -0
- package/node_modules/egg-errors/lib/http/418.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/418.js +13 -0
- package/node_modules/egg-errors/lib/http/421.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/421.js +13 -0
- package/node_modules/egg-errors/lib/http/422.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/422.js +13 -0
- package/node_modules/egg-errors/lib/http/423.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/423.js +13 -0
- package/node_modules/egg-errors/lib/http/424.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/424.js +13 -0
- package/node_modules/egg-errors/lib/http/425.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/425.js +13 -0
- package/node_modules/egg-errors/lib/http/426.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/426.js +13 -0
- package/node_modules/egg-errors/lib/http/428.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/428.js +13 -0
- package/node_modules/egg-errors/lib/http/429.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/429.js +13 -0
- package/node_modules/egg-errors/lib/http/431.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/431.js +13 -0
- package/node_modules/egg-errors/lib/http/451.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/451.js +13 -0
- package/node_modules/egg-errors/lib/http/500.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/500.js +13 -0
- package/node_modules/egg-errors/lib/http/501.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/501.js +13 -0
- package/node_modules/egg-errors/lib/http/502.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/502.js +13 -0
- package/node_modules/egg-errors/lib/http/503.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/503.js +13 -0
- package/node_modules/egg-errors/lib/http/504.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/504.js +13 -0
- package/node_modules/egg-errors/lib/http/505.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/505.js +13 -0
- package/node_modules/egg-errors/lib/http/506.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/506.js +13 -0
- package/node_modules/egg-errors/lib/http/507.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/507.js +13 -0
- package/node_modules/egg-errors/lib/http/508.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/508.js +13 -0
- package/node_modules/egg-errors/lib/http/509.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/509.js +13 -0
- package/node_modules/egg-errors/lib/http/510.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/510.js +13 -0
- package/node_modules/egg-errors/lib/http/511.d.ts +5 -0
- package/node_modules/egg-errors/lib/http/511.js +13 -0
- package/node_modules/egg-errors/lib/http/http_error.d.ts +10 -0
- package/node_modules/egg-errors/lib/http/http_error.js +13 -0
- package/node_modules/egg-errors/lib/http/http_error_options.d.ts +6 -0
- package/node_modules/egg-errors/lib/http/http_error_options.js +7 -0
- package/node_modules/egg-errors/lib/http/http_header.d.ts +3 -0
- package/node_modules/egg-errors/lib/http/http_header.js +3 -0
- package/node_modules/egg-errors/lib/index.d.ts +50 -0
- package/node_modules/egg-errors/lib/index.js +149 -0
- package/node_modules/egg-errors/package.json +49 -0
- package/node_modules/egg-logger/LICENSE +21 -0
- package/node_modules/egg-logger/README.md +128 -0
- package/node_modules/egg-logger/README.zh-CN.md +125 -0
- package/node_modules/egg-logger/index.d.ts +233 -0
- package/node_modules/egg-logger/index.js +18 -0
- package/node_modules/egg-logger/lib/egg/console_logger.js +36 -0
- package/node_modules/egg-logger/lib/egg/context_logger.js +43 -0
- package/node_modules/egg-logger/lib/egg/custom_logger.js +10 -0
- package/node_modules/egg-logger/lib/egg/error_logger.js +31 -0
- package/node_modules/egg-logger/lib/egg/logger.js +128 -0
- package/node_modules/egg-logger/lib/egg/loggers.js +163 -0
- package/node_modules/egg-logger/lib/level.js +34 -0
- package/node_modules/egg-logger/lib/logger.js +170 -0
- package/node_modules/egg-logger/lib/transports/console.js +52 -0
- package/node_modules/egg-logger/lib/transports/file.js +134 -0
- package/node_modules/egg-logger/lib/transports/file_buffer.js +113 -0
- package/node_modules/egg-logger/lib/transports/transport.js +129 -0
- package/node_modules/egg-logger/lib/utils.js +296 -0
- package/node_modules/egg-logger/package.json +54 -0
- package/node_modules/escape-html/LICENSE +24 -0
- package/node_modules/escape-html/Readme.md +43 -0
- package/node_modules/escape-html/index.js +78 -0
- package/node_modules/escape-html/package.json +24 -0
- package/node_modules/extend-shallow/LICENSE +21 -0
- package/node_modules/extend-shallow/README.md +61 -0
- package/node_modules/extend-shallow/index.js +33 -0
- package/node_modules/extend-shallow/package.json +56 -0
- package/node_modules/has-flag/index.d.ts +39 -0
- package/node_modules/has-flag/index.js +8 -0
- package/node_modules/has-flag/license +9 -0
- package/node_modules/has-flag/package.json +46 -0
- package/node_modules/has-flag/readme.md +89 -0
- package/node_modules/heartbeats/.eslintrc +151 -0
- package/node_modules/heartbeats/.npmignore +28 -0
- package/node_modules/heartbeats/.travis.yml +10 -0
- package/node_modules/heartbeats/LICENSE +21 -0
- package/node_modules/heartbeats/README.md +323 -0
- package/node_modules/heartbeats/lib/beatevent.js +35 -0
- package/node_modules/heartbeats/lib/heart.js +178 -0
- package/node_modules/heartbeats/lib/pulse.js +39 -0
- package/node_modules/heartbeats/main.js +34 -0
- package/node_modules/heartbeats/package.json +39 -0
- package/node_modules/heartbeats/test/benchmark.js +138 -0
- package/node_modules/heartbeats/test/spawn.js +16 -0
- package/node_modules/heartbeats/test/test.js +158 -0
- package/node_modules/httpx/README.md +96 -0
- package/node_modules/httpx/lib/index.d.ts +31 -0
- package/node_modules/httpx/lib/index.js +396 -0
- package/node_modules/httpx/package.json +36 -0
- package/node_modules/iconv-lite/.github/dependabot.yml +11 -0
- package/node_modules/iconv-lite/.idea/codeStyles/Project.xml +47 -0
- package/node_modules/iconv-lite/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/node_modules/iconv-lite/.idea/iconv-lite.iml +12 -0
- package/node_modules/iconv-lite/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/node_modules/iconv-lite/.idea/modules.xml +8 -0
- package/node_modules/iconv-lite/.idea/vcs.xml +6 -0
- package/node_modules/iconv-lite/Changelog.md +212 -0
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/README.md +130 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +597 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +188 -0
- package/node_modules/iconv-lite/encodings/index.js +23 -0
- package/node_modules/iconv-lite/encodings/internal.js +198 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +179 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +197 -0
- package/node_modules/iconv-lite/encodings/utf32.js +319 -0
- package/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/node_modules/iconv-lite/lib/index.d.ts +41 -0
- package/node_modules/iconv-lite/lib/index.js +180 -0
- package/node_modules/iconv-lite/lib/streams.js +109 -0
- package/node_modules/iconv-lite/package.json +44 -0
- package/node_modules/ip/README.md +90 -0
- package/node_modules/ip/lib/ip.js +496 -0
- package/node_modules/ip/package.json +25 -0
- package/node_modules/is-class-hotfix/.editorconfig +23 -0
- package/node_modules/is-class-hotfix/.gitattributes +2 -0
- package/node_modules/is-class-hotfix/CHANGELOG.md +7 -0
- package/node_modules/is-class-hotfix/LICENSE.md +21 -0
- package/node_modules/is-class-hotfix/README.md +35 -0
- package/node_modules/is-class-hotfix/bower.json +24 -0
- package/node_modules/is-class-hotfix/is-class.js +28 -0
- package/node_modules/is-class-hotfix/package.json +31 -0
- package/node_modules/is-class-hotfix/test/babel-class.js +27 -0
- package/node_modules/is-class-hotfix/test/is-class.js +31 -0
- package/node_modules/is-extendable/LICENSE +21 -0
- package/node_modules/is-extendable/README.md +72 -0
- package/node_modules/is-extendable/index.js +13 -0
- package/node_modules/is-extendable/package.json +51 -0
- package/node_modules/is-type-of/LICENSE +21 -0
- package/node_modules/is-type-of/README.md +105 -0
- package/node_modules/is-type-of/index.d.ts +65 -0
- package/node_modules/is-type-of/index.js +125 -0
- package/node_modules/is-type-of/package.json +45 -0
- package/node_modules/isstream/.jshintrc +59 -0
- package/node_modules/isstream/.npmignore +1 -0
- package/node_modules/isstream/.travis.yml +12 -0
- package/node_modules/isstream/LICENSE.md +11 -0
- package/node_modules/isstream/README.md +66 -0
- package/node_modules/isstream/isstream.js +27 -0
- package/node_modules/isstream/package.json +33 -0
- package/node_modules/isstream/test.js +168 -0
- package/node_modules/json-stringify-safe/.npmignore +1 -0
- package/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
- package/node_modules/json-stringify-safe/LICENSE +15 -0
- package/node_modules/json-stringify-safe/Makefile +35 -0
- package/node_modules/json-stringify-safe/README.md +52 -0
- package/node_modules/json-stringify-safe/package.json +31 -0
- package/node_modules/json-stringify-safe/stringify.js +27 -0
- package/node_modules/json-stringify-safe/test/mocha.opts +2 -0
- package/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
- package/node_modules/kitx/LICENSE +21 -0
- package/node_modules/kitx/README.md +35 -0
- package/node_modules/kitx/lib/index.d.ts +45 -0
- package/node_modules/kitx/lib/index.js +289 -0
- package/node_modules/kitx/package.json +41 -0
- package/node_modules/long/LICENSE +202 -0
- package/node_modules/long/README.md +246 -0
- package/node_modules/long/dist/long.js +2 -0
- package/node_modules/long/dist/long.js.map +1 -0
- package/node_modules/long/index.js +1 -0
- package/node_modules/long/package.json +34 -0
- package/node_modules/long/src/long.js +1323 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/p-timeout/index.d.ts +113 -0
- package/node_modules/p-timeout/index.js +71 -0
- package/node_modules/p-timeout/license +9 -0
- package/node_modules/p-timeout/package.json +44 -0
- package/node_modules/p-timeout/readme.md +117 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/sdk-base/LICENSE +21 -0
- package/node_modules/sdk-base/README.md +165 -0
- package/node_modules/sdk-base/index.d.ts +29 -0
- package/node_modules/sdk-base/index.js +251 -0
- package/node_modules/sdk-base/package.json +54 -0
- package/node_modules/serialize-json/LICENSE +21 -0
- package/node_modules/serialize-json/README.md +74 -0
- package/node_modules/serialize-json/lib/decoder.js +190 -0
- package/node_modules/serialize-json/lib/encoder.js +200 -0
- package/node_modules/serialize-json/lib/index.js +15 -0
- package/node_modules/serialize-json/package.json +53 -0
- package/node_modules/supports-color/browser.js +5 -0
- package/node_modules/supports-color/index.js +135 -0
- package/node_modules/supports-color/license +9 -0
- package/node_modules/supports-color/package.json +53 -0
- package/node_modules/supports-color/readme.md +76 -0
- package/node_modules/tcp-base/LICENSE +21 -0
- package/node_modules/tcp-base/README.md +134 -0
- package/node_modules/tcp-base/lib/base.js +456 -0
- package/node_modules/tcp-base/package.json +44 -0
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +108 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/node_modules/undici-types/dispatcher.d.ts +256 -0
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/node_modules/undici-types/errors.d.ts +149 -0
- package/node_modules/undici-types/eventsource.d.ts +61 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +15 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +71 -0
- package/node_modules/undici-types/interceptors.d.ts +17 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +33 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +39 -0
- package/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/node_modules/undici-types/readable.d.ts +65 -0
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/webidl.d.ts +228 -0
- package/node_modules/undici-types/websocket.d.ts +150 -0
- package/node_modules/unescape/LICENSE +21 -0
- package/node_modules/unescape/README.md +134 -0
- package/node_modules/unescape/index.js +103 -0
- package/node_modules/unescape/package.json +67 -0
- package/node_modules/utility/LICENSE.txt +21 -0
- package/node_modules/utility/README.md +370 -0
- package/node_modules/utility/dist/commonjs/array.d.ts +11 -0
- package/node_modules/utility/dist/commonjs/array.js +46 -0
- package/node_modules/utility/dist/commonjs/crypto.d.ts +86 -0
- package/node_modules/utility/dist/commonjs/crypto.js +159 -0
- package/node_modules/utility/dist/commonjs/date.d.ts +63 -0
- package/node_modules/utility/dist/commonjs/date.js +219 -0
- package/node_modules/utility/dist/commonjs/fs.d.ts +6 -0
- package/node_modules/utility/dist/commonjs/fs.js +20 -0
- package/node_modules/utility/dist/commonjs/function.d.ts +12 -0
- package/node_modules/utility/dist/commonjs/function.js +35 -0
- package/node_modules/utility/dist/commonjs/index.d.ts +12 -0
- package/node_modules/utility/dist/commonjs/index.js +29 -0
- package/node_modules/utility/dist/commonjs/json.d.ts +14 -0
- package/node_modules/utility/dist/commonjs/json.js +41 -0
- package/node_modules/utility/dist/commonjs/number.d.ts +24 -0
- package/node_modules/utility/dist/commonjs/number.js +66 -0
- package/node_modules/utility/dist/commonjs/object.d.ts +20 -0
- package/node_modules/utility/dist/commonjs/object.js +73 -0
- package/node_modules/utility/dist/commonjs/optimize.d.ts +21 -0
- package/node_modules/utility/dist/commonjs/optimize.js +60 -0
- package/node_modules/utility/dist/commonjs/package.json +3 -0
- package/node_modules/utility/dist/commonjs/string.d.ts +29 -0
- package/node_modules/utility/dist/commonjs/string.js +126 -0
- package/node_modules/utility/dist/commonjs/timeout.d.ts +6 -0
- package/node_modules/utility/dist/commonjs/timeout.js +34 -0
- package/node_modules/utility/dist/commonjs/web.d.ts +29 -0
- package/node_modules/utility/dist/commonjs/web.js +61 -0
- package/node_modules/utility/dist/esm/array.d.ts +11 -0
- package/node_modules/utility/dist/esm/array.js +42 -0
- package/node_modules/utility/dist/esm/crypto.d.ts +86 -0
- package/node_modules/utility/dist/esm/crypto.js +146 -0
- package/node_modules/utility/dist/esm/date.d.ts +63 -0
- package/node_modules/utility/dist/esm/date.js +204 -0
- package/node_modules/utility/dist/esm/fs.d.ts +6 -0
- package/node_modules/utility/dist/esm/fs.js +17 -0
- package/node_modules/utility/dist/esm/function.d.ts +12 -0
- package/node_modules/utility/dist/esm/function.js +28 -0
- package/node_modules/utility/dist/esm/index.d.ts +12 -0
- package/node_modules/utility/dist/esm/index.js +13 -0
- package/node_modules/utility/dist/esm/json.d.ts +14 -0
- package/node_modules/utility/dist/esm/json.js +34 -0
- package/node_modules/utility/dist/esm/number.d.ts +24 -0
- package/node_modules/utility/dist/esm/number.js +60 -0
- package/node_modules/utility/dist/esm/object.d.ts +20 -0
- package/node_modules/utility/dist/esm/object.js +67 -0
- package/node_modules/utility/dist/esm/optimize.d.ts +21 -0
- package/node_modules/utility/dist/esm/optimize.js +54 -0
- package/node_modules/utility/dist/esm/package.json +3 -0
- package/node_modules/utility/dist/esm/string.d.ts +29 -0
- package/node_modules/utility/dist/esm/string.js +118 -0
- package/node_modules/utility/dist/esm/timeout.d.ts +6 -0
- package/node_modules/utility/dist/esm/timeout.js +28 -0
- package/node_modules/utility/dist/esm/web.d.ts +29 -0
- package/node_modules/utility/dist/esm/web.js +52 -0
- package/node_modules/utility/dist/package.json +4 -0
- package/node_modules/utility/package.json +85 -0
- package/node_modules/utility/src/array.ts +44 -0
- package/node_modules/utility/src/crypto.ts +160 -0
- package/node_modules/utility/src/date.ts +232 -0
- package/node_modules/utility/src/fs.ts +17 -0
- package/node_modules/utility/src/function.ts +30 -0
- package/node_modules/utility/src/index.ts +12 -0
- package/node_modules/utility/src/json.ts +48 -0
- package/node_modules/utility/src/number.ts +63 -0
- package/node_modules/utility/src/object.ts +72 -0
- package/node_modules/utility/src/optimize.ts +62 -0
- package/node_modules/utility/src/string.ts +132 -0
- package/node_modules/utility/src/timeout.ts +37 -0
- package/node_modules/utility/src/web.ts +53 -0
- package/node_modules/ylru/LICENSE +25 -0
- package/node_modules/ylru/README.md +120 -0
- package/node_modules/ylru/dist/commonjs/index.d.ts +21 -0
- package/node_modules/ylru/dist/commonjs/index.js +112 -0
- package/node_modules/ylru/dist/commonjs/package.json +3 -0
- package/node_modules/ylru/dist/esm/index.d.ts +21 -0
- package/node_modules/ylru/dist/esm/index.js +108 -0
- package/node_modules/ylru/dist/esm/package.json +3 -0
- package/node_modules/ylru/package.json +71 -0
- package/node_modules/ylru/src/index.ts +124 -0
- package/package.json +2 -2
- package/node_modules/@ali/cli-skills/dist/_chunks/libs/abort-controller.mjs +0 -424
- package/node_modules/@ali/cli-skills/dist/_chunks/libs/archiver.mjs +0 -19586
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Description of supported double byte encodings and aliases.
|
|
4
|
+
// Tables are not require()-d until they are needed to speed up library load.
|
|
5
|
+
// require()-s are direct to support Browserify.
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
|
|
9
|
+
// == Japanese/ShiftJIS ====================================================
|
|
10
|
+
// All japanese encodings are based on JIS X set of standards:
|
|
11
|
+
// JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
|
|
12
|
+
// JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
|
|
13
|
+
// Has several variations in 1978, 1983, 1990 and 1997.
|
|
14
|
+
// JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
|
|
15
|
+
// JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
|
|
16
|
+
// 2 planes, first is superset of 0208, second - revised 0212.
|
|
17
|
+
// Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
|
|
18
|
+
|
|
19
|
+
// Byte encodings are:
|
|
20
|
+
// * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
|
|
21
|
+
// encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
|
|
22
|
+
// Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
|
|
23
|
+
// * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
|
|
24
|
+
// 0x00-0x7F - lower part of 0201
|
|
25
|
+
// 0x8E, 0xA1-0xDF - upper part of 0201
|
|
26
|
+
// (0xA1-0xFE)x2 - 0208 plane (94x94).
|
|
27
|
+
// 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
|
|
28
|
+
// * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
|
|
29
|
+
// Used as-is in ISO2022 family.
|
|
30
|
+
// * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
|
|
31
|
+
// 0201-1976 Roman, 0208-1978, 0208-1983.
|
|
32
|
+
// * ISO2022-JP-1: Adds esc seq for 0212-1990.
|
|
33
|
+
// * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
|
|
34
|
+
// * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
|
|
35
|
+
// * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
|
|
36
|
+
//
|
|
37
|
+
// After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
|
|
38
|
+
//
|
|
39
|
+
// Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
|
|
40
|
+
|
|
41
|
+
'shiftjis': {
|
|
42
|
+
type: '_dbcs',
|
|
43
|
+
table: function() { return require('./tables/shiftjis.json') },
|
|
44
|
+
encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
|
|
45
|
+
encodeSkipVals: [{from: 0xED40, to: 0xF940}],
|
|
46
|
+
},
|
|
47
|
+
'csshiftjis': 'shiftjis',
|
|
48
|
+
'mskanji': 'shiftjis',
|
|
49
|
+
'sjis': 'shiftjis',
|
|
50
|
+
'windows31j': 'shiftjis',
|
|
51
|
+
'ms31j': 'shiftjis',
|
|
52
|
+
'xsjis': 'shiftjis',
|
|
53
|
+
'windows932': 'shiftjis',
|
|
54
|
+
'ms932': 'shiftjis',
|
|
55
|
+
'932': 'shiftjis',
|
|
56
|
+
'cp932': 'shiftjis',
|
|
57
|
+
|
|
58
|
+
'eucjp': {
|
|
59
|
+
type: '_dbcs',
|
|
60
|
+
table: function() { return require('./tables/eucjp.json') },
|
|
61
|
+
encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
// TODO: KDDI extension to Shift_JIS
|
|
65
|
+
// TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
|
|
66
|
+
// TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
// == Chinese/GBK ==========================================================
|
|
70
|
+
// http://en.wikipedia.org/wiki/GBK
|
|
71
|
+
// We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
|
|
72
|
+
|
|
73
|
+
// Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
|
|
74
|
+
'gb2312': 'cp936',
|
|
75
|
+
'gb231280': 'cp936',
|
|
76
|
+
'gb23121980': 'cp936',
|
|
77
|
+
'csgb2312': 'cp936',
|
|
78
|
+
'csiso58gb231280': 'cp936',
|
|
79
|
+
'euccn': 'cp936',
|
|
80
|
+
|
|
81
|
+
// Microsoft's CP936 is a subset and approximation of GBK.
|
|
82
|
+
'windows936': 'cp936',
|
|
83
|
+
'ms936': 'cp936',
|
|
84
|
+
'936': 'cp936',
|
|
85
|
+
'cp936': {
|
|
86
|
+
type: '_dbcs',
|
|
87
|
+
table: function() { return require('./tables/cp936.json') },
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
// GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
|
|
91
|
+
'gbk': {
|
|
92
|
+
type: '_dbcs',
|
|
93
|
+
table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
|
|
94
|
+
},
|
|
95
|
+
'xgbk': 'gbk',
|
|
96
|
+
'isoir58': 'gbk',
|
|
97
|
+
|
|
98
|
+
// GB18030 is an algorithmic extension of GBK.
|
|
99
|
+
// Main source: https://www.w3.org/TR/encoding/#gbk-encoder
|
|
100
|
+
// http://icu-project.org/docs/papers/gb18030.html
|
|
101
|
+
// http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
|
|
102
|
+
// http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
|
|
103
|
+
'gb18030': {
|
|
104
|
+
type: '_dbcs',
|
|
105
|
+
table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
|
|
106
|
+
gb18030: function() { return require('./tables/gb18030-ranges.json') },
|
|
107
|
+
encodeSkipVals: [0x80],
|
|
108
|
+
encodeAdd: {'€': 0xA2E3},
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
'chinese': 'gb18030',
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
// == Korean ===============================================================
|
|
115
|
+
// EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
|
|
116
|
+
'windows949': 'cp949',
|
|
117
|
+
'ms949': 'cp949',
|
|
118
|
+
'949': 'cp949',
|
|
119
|
+
'cp949': {
|
|
120
|
+
type: '_dbcs',
|
|
121
|
+
table: function() { return require('./tables/cp949.json') },
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
'cseuckr': 'cp949',
|
|
125
|
+
'csksc56011987': 'cp949',
|
|
126
|
+
'euckr': 'cp949',
|
|
127
|
+
'isoir149': 'cp949',
|
|
128
|
+
'korean': 'cp949',
|
|
129
|
+
'ksc56011987': 'cp949',
|
|
130
|
+
'ksc56011989': 'cp949',
|
|
131
|
+
'ksc5601': 'cp949',
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
// == Big5/Taiwan/Hong Kong ================================================
|
|
135
|
+
// There are lots of tables for Big5 and cp950. Please see the following links for history:
|
|
136
|
+
// http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
|
|
137
|
+
// Variations, in roughly number of defined chars:
|
|
138
|
+
// * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
|
|
139
|
+
// * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
|
|
140
|
+
// * Big5-2003 (Taiwan standard) almost superset of cp950.
|
|
141
|
+
// * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
|
|
142
|
+
// * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
|
|
143
|
+
// many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
|
|
144
|
+
// Plus, it has 4 combining sequences.
|
|
145
|
+
// Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
|
|
146
|
+
// because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
|
|
147
|
+
// Implementations are not consistent within browsers; sometimes labeled as just big5.
|
|
148
|
+
// MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
|
|
149
|
+
// Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
|
|
150
|
+
// In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
|
|
151
|
+
// Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
|
|
152
|
+
// http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
|
|
153
|
+
//
|
|
154
|
+
// Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
|
|
155
|
+
// Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
|
|
156
|
+
|
|
157
|
+
'windows950': 'cp950',
|
|
158
|
+
'ms950': 'cp950',
|
|
159
|
+
'950': 'cp950',
|
|
160
|
+
'cp950': {
|
|
161
|
+
type: '_dbcs',
|
|
162
|
+
table: function() { return require('./tables/cp950.json') },
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
// Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
|
|
166
|
+
'big5': 'big5hkscs',
|
|
167
|
+
'big5hkscs': {
|
|
168
|
+
type: '_dbcs',
|
|
169
|
+
table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) },
|
|
170
|
+
encodeSkipVals: [
|
|
171
|
+
// Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of
|
|
172
|
+
// https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU.
|
|
173
|
+
// But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter.
|
|
174
|
+
0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe,
|
|
175
|
+
0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca,
|
|
176
|
+
0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62,
|
|
177
|
+
0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef,
|
|
178
|
+
0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed,
|
|
179
|
+
|
|
180
|
+
// Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345
|
|
181
|
+
0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce,
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
|
|
185
|
+
'cnbig5': 'big5hkscs',
|
|
186
|
+
'csbig5': 'big5hkscs',
|
|
187
|
+
'xxbig5': 'big5hkscs',
|
|
188
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Update this array if you add/rename/remove files in this directory.
|
|
4
|
+
// We support Browserify by skipping automatic module discovery and requiring modules directly.
|
|
5
|
+
var modules = [
|
|
6
|
+
require("./internal"),
|
|
7
|
+
require("./utf32"),
|
|
8
|
+
require("./utf16"),
|
|
9
|
+
require("./utf7"),
|
|
10
|
+
require("./sbcs-codec"),
|
|
11
|
+
require("./sbcs-data"),
|
|
12
|
+
require("./sbcs-data-generated"),
|
|
13
|
+
require("./dbcs-codec"),
|
|
14
|
+
require("./dbcs-data"),
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
// Put all encoding/alias/codec definitions to single object and export it.
|
|
18
|
+
for (var i = 0; i < modules.length; i++) {
|
|
19
|
+
var module = modules[i];
|
|
20
|
+
for (var enc in module)
|
|
21
|
+
if (Object.prototype.hasOwnProperty.call(module, enc))
|
|
22
|
+
exports[enc] = module[enc];
|
|
23
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var Buffer = require("safer-buffer").Buffer;
|
|
3
|
+
|
|
4
|
+
// Export Node.js internal encodings.
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
// Encodings
|
|
8
|
+
utf8: { type: "_internal", bomAware: true},
|
|
9
|
+
cesu8: { type: "_internal", bomAware: true},
|
|
10
|
+
unicode11utf8: "utf8",
|
|
11
|
+
|
|
12
|
+
ucs2: { type: "_internal", bomAware: true},
|
|
13
|
+
utf16le: "ucs2",
|
|
14
|
+
|
|
15
|
+
binary: { type: "_internal" },
|
|
16
|
+
base64: { type: "_internal" },
|
|
17
|
+
hex: { type: "_internal" },
|
|
18
|
+
|
|
19
|
+
// Codec.
|
|
20
|
+
_internal: InternalCodec,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//------------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
function InternalCodec(codecOptions, iconv) {
|
|
26
|
+
this.enc = codecOptions.encodingName;
|
|
27
|
+
this.bomAware = codecOptions.bomAware;
|
|
28
|
+
|
|
29
|
+
if (this.enc === "base64")
|
|
30
|
+
this.encoder = InternalEncoderBase64;
|
|
31
|
+
else if (this.enc === "cesu8") {
|
|
32
|
+
this.enc = "utf8"; // Use utf8 for decoding.
|
|
33
|
+
this.encoder = InternalEncoderCesu8;
|
|
34
|
+
|
|
35
|
+
// Add decoder for versions of Node not supporting CESU-8
|
|
36
|
+
if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') {
|
|
37
|
+
this.decoder = InternalDecoderCesu8;
|
|
38
|
+
this.defaultCharUnicode = iconv.defaultCharUnicode;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
InternalCodec.prototype.encoder = InternalEncoder;
|
|
44
|
+
InternalCodec.prototype.decoder = InternalDecoder;
|
|
45
|
+
|
|
46
|
+
//------------------------------------------------------------------------------
|
|
47
|
+
|
|
48
|
+
// We use node.js internal decoder. Its signature is the same as ours.
|
|
49
|
+
var StringDecoder = require('string_decoder').StringDecoder;
|
|
50
|
+
|
|
51
|
+
if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
|
|
52
|
+
StringDecoder.prototype.end = function() {};
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
function InternalDecoder(options, codec) {
|
|
56
|
+
this.decoder = new StringDecoder(codec.enc);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
InternalDecoder.prototype.write = function(buf) {
|
|
60
|
+
if (!Buffer.isBuffer(buf)) {
|
|
61
|
+
buf = Buffer.from(buf);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return this.decoder.write(buf);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
InternalDecoder.prototype.end = function() {
|
|
68
|
+
return this.decoder.end();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
//------------------------------------------------------------------------------
|
|
73
|
+
// Encoder is mostly trivial
|
|
74
|
+
|
|
75
|
+
function InternalEncoder(options, codec) {
|
|
76
|
+
this.enc = codec.enc;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
InternalEncoder.prototype.write = function(str) {
|
|
80
|
+
return Buffer.from(str, this.enc);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
InternalEncoder.prototype.end = function() {
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
//------------------------------------------------------------------------------
|
|
88
|
+
// Except base64 encoder, which must keep its state.
|
|
89
|
+
|
|
90
|
+
function InternalEncoderBase64(options, codec) {
|
|
91
|
+
this.prevStr = '';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
InternalEncoderBase64.prototype.write = function(str) {
|
|
95
|
+
str = this.prevStr + str;
|
|
96
|
+
var completeQuads = str.length - (str.length % 4);
|
|
97
|
+
this.prevStr = str.slice(completeQuads);
|
|
98
|
+
str = str.slice(0, completeQuads);
|
|
99
|
+
|
|
100
|
+
return Buffer.from(str, "base64");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
InternalEncoderBase64.prototype.end = function() {
|
|
104
|
+
return Buffer.from(this.prevStr, "base64");
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
//------------------------------------------------------------------------------
|
|
109
|
+
// CESU-8 encoder is also special.
|
|
110
|
+
|
|
111
|
+
function InternalEncoderCesu8(options, codec) {
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
InternalEncoderCesu8.prototype.write = function(str) {
|
|
115
|
+
var buf = Buffer.alloc(str.length * 3), bufIdx = 0;
|
|
116
|
+
for (var i = 0; i < str.length; i++) {
|
|
117
|
+
var charCode = str.charCodeAt(i);
|
|
118
|
+
// Naive implementation, but it works because CESU-8 is especially easy
|
|
119
|
+
// to convert from UTF-16 (which all JS strings are encoded in).
|
|
120
|
+
if (charCode < 0x80)
|
|
121
|
+
buf[bufIdx++] = charCode;
|
|
122
|
+
else if (charCode < 0x800) {
|
|
123
|
+
buf[bufIdx++] = 0xC0 + (charCode >>> 6);
|
|
124
|
+
buf[bufIdx++] = 0x80 + (charCode & 0x3f);
|
|
125
|
+
}
|
|
126
|
+
else { // charCode will always be < 0x10000 in javascript.
|
|
127
|
+
buf[bufIdx++] = 0xE0 + (charCode >>> 12);
|
|
128
|
+
buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);
|
|
129
|
+
buf[bufIdx++] = 0x80 + (charCode & 0x3f);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return buf.slice(0, bufIdx);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
InternalEncoderCesu8.prototype.end = function() {
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//------------------------------------------------------------------------------
|
|
139
|
+
// CESU-8 decoder is not implemented in Node v4.0+
|
|
140
|
+
|
|
141
|
+
function InternalDecoderCesu8(options, codec) {
|
|
142
|
+
this.acc = 0;
|
|
143
|
+
this.contBytes = 0;
|
|
144
|
+
this.accBytes = 0;
|
|
145
|
+
this.defaultCharUnicode = codec.defaultCharUnicode;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
InternalDecoderCesu8.prototype.write = function(buf) {
|
|
149
|
+
var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes,
|
|
150
|
+
res = '';
|
|
151
|
+
for (var i = 0; i < buf.length; i++) {
|
|
152
|
+
var curByte = buf[i];
|
|
153
|
+
if ((curByte & 0xC0) !== 0x80) { // Leading byte
|
|
154
|
+
if (contBytes > 0) { // Previous code is invalid
|
|
155
|
+
res += this.defaultCharUnicode;
|
|
156
|
+
contBytes = 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (curByte < 0x80) { // Single-byte code
|
|
160
|
+
res += String.fromCharCode(curByte);
|
|
161
|
+
} else if (curByte < 0xE0) { // Two-byte code
|
|
162
|
+
acc = curByte & 0x1F;
|
|
163
|
+
contBytes = 1; accBytes = 1;
|
|
164
|
+
} else if (curByte < 0xF0) { // Three-byte code
|
|
165
|
+
acc = curByte & 0x0F;
|
|
166
|
+
contBytes = 2; accBytes = 1;
|
|
167
|
+
} else { // Four or more are not supported for CESU-8.
|
|
168
|
+
res += this.defaultCharUnicode;
|
|
169
|
+
}
|
|
170
|
+
} else { // Continuation byte
|
|
171
|
+
if (contBytes > 0) { // We're waiting for it.
|
|
172
|
+
acc = (acc << 6) | (curByte & 0x3f);
|
|
173
|
+
contBytes--; accBytes++;
|
|
174
|
+
if (contBytes === 0) {
|
|
175
|
+
// Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)
|
|
176
|
+
if (accBytes === 2 && acc < 0x80 && acc > 0)
|
|
177
|
+
res += this.defaultCharUnicode;
|
|
178
|
+
else if (accBytes === 3 && acc < 0x800)
|
|
179
|
+
res += this.defaultCharUnicode;
|
|
180
|
+
else
|
|
181
|
+
// Actually add character.
|
|
182
|
+
res += String.fromCharCode(acc);
|
|
183
|
+
}
|
|
184
|
+
} else { // Unexpected continuation byte
|
|
185
|
+
res += this.defaultCharUnicode;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;
|
|
190
|
+
return res;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
InternalDecoderCesu8.prototype.end = function() {
|
|
194
|
+
var res = 0;
|
|
195
|
+
if (this.contBytes > 0)
|
|
196
|
+
res += this.defaultCharUnicode;
|
|
197
|
+
return res;
|
|
198
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var Buffer = require("safer-buffer").Buffer;
|
|
3
|
+
|
|
4
|
+
// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
|
|
5
|
+
// correspond to encoded bytes (if 128 - then lower half is ASCII).
|
|
6
|
+
|
|
7
|
+
exports._sbcs = SBCSCodec;
|
|
8
|
+
function SBCSCodec(codecOptions, iconv) {
|
|
9
|
+
if (!codecOptions)
|
|
10
|
+
throw new Error("SBCS codec is called without the data.")
|
|
11
|
+
|
|
12
|
+
// Prepare char buffer for decoding.
|
|
13
|
+
if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))
|
|
14
|
+
throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)");
|
|
15
|
+
|
|
16
|
+
if (codecOptions.chars.length === 128) {
|
|
17
|
+
var asciiString = "";
|
|
18
|
+
for (var i = 0; i < 128; i++)
|
|
19
|
+
asciiString += String.fromCharCode(i);
|
|
20
|
+
codecOptions.chars = asciiString + codecOptions.chars;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2');
|
|
24
|
+
|
|
25
|
+
// Encoding buffer.
|
|
26
|
+
var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
|
|
27
|
+
|
|
28
|
+
for (var i = 0; i < codecOptions.chars.length; i++)
|
|
29
|
+
encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
|
|
30
|
+
|
|
31
|
+
this.encodeBuf = encodeBuf;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
SBCSCodec.prototype.encoder = SBCSEncoder;
|
|
35
|
+
SBCSCodec.prototype.decoder = SBCSDecoder;
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
function SBCSEncoder(options, codec) {
|
|
39
|
+
this.encodeBuf = codec.encodeBuf;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
SBCSEncoder.prototype.write = function(str) {
|
|
43
|
+
var buf = Buffer.alloc(str.length);
|
|
44
|
+
for (var i = 0; i < str.length; i++)
|
|
45
|
+
buf[i] = this.encodeBuf[str.charCodeAt(i)];
|
|
46
|
+
|
|
47
|
+
return buf;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
SBCSEncoder.prototype.end = function() {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
function SBCSDecoder(options, codec) {
|
|
55
|
+
this.decodeBuf = codec.decodeBuf;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
SBCSDecoder.prototype.write = function(buf) {
|
|
59
|
+
// Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
|
|
60
|
+
var decodeBuf = this.decodeBuf;
|
|
61
|
+
var newBuf = Buffer.alloc(buf.length*2);
|
|
62
|
+
var idx1 = 0, idx2 = 0;
|
|
63
|
+
for (var i = 0; i < buf.length; i++) {
|
|
64
|
+
idx1 = buf[i]*2; idx2 = i*2;
|
|
65
|
+
newBuf[idx2] = decodeBuf[idx1];
|
|
66
|
+
newBuf[idx2+1] = decodeBuf[idx1+1];
|
|
67
|
+
}
|
|
68
|
+
return newBuf.toString('ucs2');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
SBCSDecoder.prototype.end = function() {
|
|
72
|
+
}
|