diff --git a/.github/workflows/bundle-report.yml b/.github/workflows/bundle-report.yml index 6c91f72b25..269019c3c7 100644 --- a/.github/workflows/bundle-report.yml +++ b/.github/workflows/bundle-report.yml @@ -26,7 +26,6 @@ jobs: run: | mkdir bundle-reports npm run sourcemap -- --html bundle-reports/index.html - npm run sourcemap:noencryption -- --html bundle-reports/noencryption.html - uses: aws-actions/configure-aws-credentials@v1 with: aws-region: eu-west-2 diff --git a/Gruntfile.js b/Gruntfile.js index fc5d605ea2..673c787f44 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -129,18 +129,6 @@ module.exports = function (grunt) { outfile: 'build/ably.min.js', minify: true, }), - esbuild.build({ - ...baseConfig, - entryPoints: ['src/platform/web-noencryption/index.ts'], - outfile: 'build/ably.noencryption.js', - }), - - esbuild.build({ - ...baseConfig, - entryPoints: ['src/platform/web-noencryption/index.ts'], - outfile: 'build/ably.noencryption.min.js', - minify: true, - }), ]).then(() => { console.log('esbuild succeeded'); done(true); diff --git a/package.json b/package.json index 534b07c644..4a64b51660 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,6 @@ "format": "prettier --write --ignore-path .gitignore --ignore-path .prettierignore src test ably.d.ts webpack.config.js Gruntfile.js scripts/*.js docs/chrome-mv3.md", "format:check": "prettier --check --ignore-path .gitignore --ignore-path .prettierignore src test ably.d.ts webpack.config.js Gruntfile.js scripts/*.js", "sourcemap": "source-map-explorer build/ably.min.js", - "sourcemap:noencryption": "source-map-explorer build/ably.noencryption.min.js", "modulereport": "node scripts/moduleReport.js", "docs": "typedoc --entryPoints ably.d.ts --out docs/generated --readme docs/landing-page.md" } diff --git a/scripts/cdn_deploy.js b/scripts/cdn_deploy.js index a8f5f944b2..dd02db325c 100755 --- a/scripts/cdn_deploy.js +++ b/scripts/cdn_deploy.js @@ -21,7 +21,7 @@ async function run() { // Comma separated directories (relative to `path`) to exclude from upload excludeDirs: 'node_modules,.git', // Regex to match files against for upload - fileRegex: '^ably(\\.noencryption)?(\\.min)?\\.js$', + fileRegex: '^ably?(\\.min)?\\.js$', ...argv, }; diff --git a/src/platform/web-noencryption/index.ts b/src/platform/web-noencryption/index.ts deleted file mode 100644 index 4b8d3ed9de..0000000000 --- a/src/platform/web-noencryption/index.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Common -import { DefaultRest } from '../../common/lib/client/defaultrest'; -import { DefaultRealtime } from '../../common/lib/client/defaultrealtime'; -import Platform from '../../common/platform'; -import ErrorInfo from '../../common/lib/types/errorinfo'; - -// Platform Specific -import BufferUtils from '../web/lib/util/bufferutils'; -// @ts-ignore -import Http from '../web/lib/util/http'; -import Config from '../web/config'; -// @ts-ignore -import Transports from '../web/lib/transport'; -import Logger from '../../common/lib/util/logger'; -import { getDefaults } from '../../common/lib/util/defaults'; -import WebStorage from '../web/lib/util/webstorage'; -import PlatformDefaults from '../web/lib/util/defaults'; -import msgpack from '../web/lib/util/msgpack'; - -Platform.Crypto = null; -Platform.BufferUtils = BufferUtils; -Platform.Http = Http; -Platform.Config = Config; -Platform.Transports = Transports; -Platform.WebStorage = WebStorage; - -for (const clientClass of [DefaultRest, DefaultRealtime]) { - clientClass._MsgPack = msgpack; -} - -Logger.initLogHandlers(); - -Platform.Defaults = getDefaults(PlatformDefaults); - -if (Platform.Config.agent) { - // @ts-ignore - Platform.Defaults.agent += ' ' + Platform.Config.agent; -} - -export default { - ErrorInfo, - Rest: DefaultRest, - Realtime: DefaultRealtime, - msgpack, -}; diff --git a/test/common/globals/named_dependencies.js b/test/common/globals/named_dependencies.js index 4fc3a7407e..0558b575e7 100644 --- a/test/common/globals/named_dependencies.js +++ b/test/common/globals/named_dependencies.js @@ -3,7 +3,6 @@ define(function () { return (module.exports = { // Ably modules ably: { browser: 'build/ably', node: 'build/ably-node' }, - 'ably.noencryption': { browser: 'build/ably.noencryption' }, 'vcdiff-decoder': { browser: 'node_modules/@ably/vcdiff-decoder/dist/vcdiff-decoder', node: 'node_modules/@ably/vcdiff-decoder', diff --git a/test/support/browser_file_list.js b/test/support/browser_file_list.js index 4d0fa8522d..5a4ceedc16 100644 --- a/test/support/browser_file_list.js +++ b/test/support/browser_file_list.js @@ -6,8 +6,6 @@ window.__testFiles__.files = { 'build/ably-webworker.min.js': true, 'build/ably.js': true, 'build/ably.min.js': true, - 'build/ably.noencryption.js': true, - 'build/ably.noencryption.min.js': true, 'browser/lib/util/base64.js': true, 'node_modules/async/lib/async.js': true, 'node_modules/@ably/vcdiff-decoder/dist/vcdiff-decoder.js': true, diff --git a/test/support/browser_setup.js b/test/support/browser_setup.js index 6ab5e74ab7..af7fc6b693 100644 --- a/test/support/browser_setup.js +++ b/test/support/browser_setup.js @@ -55,9 +55,6 @@ require([(baseUrl + '/test/common/globals/named_dependencies.js').replace('//', ably: { exports: 'Ably', }, - 'ably.noencryption': { - exports: 'Ably', - }, 'browser-base64': { exports: 'Base64', },