drone_view 3.0.55 → 3.0.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drone_view",
3
- "version": "3.0.55",
3
+ "version": "3.0.56",
4
4
  "main": "dist/droneView.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -1,82 +1,114 @@
1
1
  /* eslint-disable linebreak-style */
2
- // The path to the CesiumJS source code
3
- const cesiumSource = 'node_modules/cesium/Source';
4
- const cesiumBuild = 'node_modules/cesium/Build/Cesium';
5
- const CopyWebpackPlugin = require('copy-webpack-plugin');
6
- const path = require('path');
7
- const webpack = require('webpack');
8
- const WrapperPlugin = require('wrapper-webpack-plugin');
2
+
3
+ // Cesium 1.135.0 uses ES modules only
4
+ const cesiumESM = "node_modules/cesium";
5
+ const path = require("path");
6
+ const webpack = require("webpack");
7
+ const CopyWebpackPlugin = require("copy-webpack-plugin");
9
8
 
10
9
  module.exports = {
11
10
  context: __dirname,
12
- devtool: 'inline-source-map',
11
+ mode: "development",
12
+ devtool: "inline-source-map",
13
13
  watch: true,
14
+
14
15
  entry: {
15
- main: './src/droneView.ts',
16
+ main: "./src/droneView.ts",
16
17
  },
18
+
17
19
  stats: {
18
20
  children: true,
19
21
  errorDetails: true,
20
22
  },
23
+
21
24
  output: {
22
- filename: 'droneView.js',
23
- path: path.resolve(__dirname, 'dist'),
24
- publicPath: 'build',
25
- libraryTarget: 'umd',
26
- library: 'DroneView',
27
- sourcePrefix: '',
28
- },
29
- amd: {
30
- // Enable webpack-friendly use of require in Cesium
31
- toUrlUndefined: true,
25
+ filename: "droneView.js",
26
+ path: path.resolve(__dirname, "dist"),
27
+ publicPath: "build",
28
+ libraryTarget: "umd",
29
+ library: "DroneView",
30
+ sourcePrefix: "",
31
+ clean: true,
32
32
  },
33
+
33
34
  resolve: {
34
- extensions: ['.ts', '.tsx', '.js', '.cjs'],
35
+ extensions: [".ts", ".tsx", ".js", ".cjs"],
36
+
37
+ // Required because Cesium uses some Node APIs
35
38
  fallback: {
36
- https: false, zlib: false, http: false, url: false,
39
+ https: false,
40
+ zlib: false,
41
+ http: false,
42
+ url: false,
43
+ fs: false,
37
44
  },
38
- mainFiles: ['droneView', 'Cesium'],
45
+
39
46
  alias: {
40
- cesium: path.resolve(__dirname, cesiumSource),
41
- 'process/browser': require.resolve('process/browser.js'),
42
- process: require.resolve('process/browser.js'),
47
+ // Must point to the ESM folder
48
+ cesium: path.resolve(__dirname, cesiumESM),
49
+
50
+ "process/browser": require.resolve("process/browser.js"),
51
+ process: require.resolve("process/browser.js"),
43
52
  },
44
53
  },
54
+
45
55
  module: {
46
- rules: [{
47
- test: /\.css$/,
48
- use: ['style-loader', 'css-loader'],
49
- exclude: /node_modules/,
56
+ rules: [
57
+ {
58
+ test: /\.css$/,
59
+ use: ["style-loader", "css-loader"],
60
+ },
50
61
 
51
- }, {
52
- test: /\.(png|gif|jpg|jpeg|svg|xml|json)$/,
53
- use: ['url-loader'],
54
- exclude: /node_modules/,
62
+ {
63
+ test: /\.(png|gif|jpg|jpeg|svg|xml|json)$/i,
64
+ type: "asset/resource",
65
+ },
55
66
 
56
- },
57
- {
58
- test: /\.tsx?$/,
59
- use: 'ts-loader',
60
- exclude: /node_modules/,
61
- }],
67
+ {
68
+ test: /\.tsx?$/,
69
+ use: "ts-loader",
70
+ exclude: /node_modules/,
71
+ },
72
+
73
+ {
74
+ // Critical: allows Cesium ES modules to load properly
75
+ test: /\.js$/,
76
+ include: /node_modules[\\/]cesium/,
77
+ type: "javascript/esm",
78
+ },
79
+ ],
62
80
  },
81
+
63
82
  plugins: [
64
- // Copy Cesium Assets, Widgets, and Workers to a static directory used at runtime
83
+ // Copy assets required by Cesium at runtime (ESM build)
65
84
  new CopyWebpackPlugin({
66
85
  patterns: [
67
- { from: path.join(cesiumBuild, 'Workers'), to: path.resolve(__dirname, 'service/3d/Workers') },
68
- { from: path.join(cesiumBuild, 'Assets'), to: path.resolve(__dirname, 'service/3d/Assets') },
69
- { from: path.join(cesiumBuild, 'Widgets'), to: path.resolve(__dirname, 'service/3d/Widgets') },
70
- { from: path.join(cesiumBuild, 'ThirdParty'), to: path.resolve(__dirname, 'service/3d/ThirdParty') },
86
+ {
87
+ from: "node_modules/cesium/Build/Cesium/Assets",
88
+ to: "service/3d/Assets",
89
+ },
90
+ {
91
+ from: "node_modules/cesium/Build/Cesium/Workers",
92
+ to: "service/3d/Workers",
93
+ },
94
+ {
95
+ from: "node_modules/cesium/Build/Cesium/ThirdParty",
96
+ to: "service/3d/ThirdParty",
97
+ },
98
+ {
99
+ from: "node_modules/cesium/Build/Cesium/Cesium.js",
100
+ to: "service/3d/Cesium.js",
101
+ },
71
102
  ],
72
103
  }),
104
+
73
105
  new webpack.ProvidePlugin({
74
- process: require.resolve('process/browser.js'),
106
+ process: require.resolve("process/browser.js"),
75
107
  }),
108
+
109
+ // Required for loading Workers/Assets at runtime
76
110
  new webpack.DefinePlugin({
77
- // Define relative base path in cesium for loading assets
78
- CESIUM_BASE_URL: JSON.stringify('/service/3d/'),
111
+ CESIUM_BASE_URL: JSON.stringify("/service/3d/"),
79
112
  }),
80
113
  ],
81
- mode: 'development',
82
114
  };
@@ -1,78 +1,99 @@
1
1
  /* eslint-disable linebreak-style */
2
- // The path to the CesiumJS source code
3
- const cesiumSource = 'node_modules/cesium/Source';
4
- const cesiumBuild = 'node_modules/cesium/Build/Cesium';
5
- const CopyWebpackPlugin = require('copy-webpack-plugin');
6
- const path = require('path');
7
- const webpack = require('webpack');
8
- const WrapperPlugin = require('wrapper-webpack-plugin');
2
+
3
+ const path = require("path");
4
+ const webpack = require("webpack");
5
+ const CopyWebpackPlugin = require("copy-webpack-plugin");
6
+
7
+ // Cesium 1.135.0 uses ES modules only
8
+ const cesiumESM = "node_modules/cesium";
9
+ const cesiumUnmin = "node_modules/cesium/Build/CesiumUnminified";
9
10
 
10
11
  module.exports = {
11
12
  entry: {
12
- main: './src/droneView.ts',
13
+ main: "./src/droneView.ts",
13
14
  },
15
+
14
16
  stats: {
15
17
  children: true,
16
18
  errorDetails: true,
17
19
  },
20
+
18
21
  output: {
19
- filename: 'droneView.js',
20
- path: path.resolve(__dirname, 'dist'),
21
- library: 'DroneView',
22
- publicPath: 'build',
23
- libraryTarget: 'umd',
24
- sourcePrefix: '',
25
- },
26
- amd: {
27
- // Enable webpack-friendly use of require in Cesium
28
- toUrlUndefined: true,
22
+ filename: "droneView.js",
23
+ path: path.resolve(__dirname, "dist"),
24
+ library: "DroneView",
25
+ libraryTarget: "umd",
26
+ publicPath: "build",
27
+ sourcePrefix: "",
28
+ clean: true,
29
29
  },
30
+
30
31
  resolve: {
31
- extensions: ['.ts', '.tsx', '.js'],
32
+ extensions: [".ts", ".tsx", ".js"],
32
33
  fallback: {
33
- https: false, zlib: false, http: false, url: false,
34
+ https: false,
35
+ zlib: false,
36
+ http: false,
37
+ url: false,
38
+ fs: false, // <-- required for Cesium ESM
34
39
  },
35
- mainFiles: ['viewer', 'Cesium'],
40
+
36
41
  alias: {
37
- // CesiumJS module name
38
- cesium: path.resolve(__dirname, cesiumSource),
42
+ // MUST point to ESM folder, not Build/Cesium
43
+ cesium: path.resolve(__dirname, cesiumESM),
39
44
  },
40
45
  },
46
+
41
47
  module: {
42
- rules: [{
43
- test: /\.css$/,
44
- use: ['style-loader', 'css-loader'],
45
- exclude: /node_modules/,
48
+ rules: [
49
+ {
50
+ test: /\.css$/,
51
+ use: ["style-loader", "css-loader"],
52
+ },
46
53
 
47
- }, {
48
- test: /\.(png|gif|jpg|jpeg|svg|xml|json)$/,
49
- use: ['url-loader'],
50
- exclude: /node_modules/,
54
+ {
55
+ test: /\.(png|gif|jpg|jpeg|svg|xml|json)$/i,
56
+ type: "asset/resource",
57
+ },
51
58
 
52
- },
53
- {
54
- test: /\.tsx?$/,
55
- use: 'ts-loader',
56
- exclude: /node_modules/,
57
- }],
59
+ {
60
+ test: /\.tsx?$/,
61
+ use: "ts-loader",
62
+ exclude: /node_modules/,
63
+ },
64
+
65
+ {
66
+ // Required for Cesium ES modules to load correctly
67
+ test: /\.js$/,
68
+ include: /node_modules[\\/]cesium/,
69
+ type: "javascript/esm",
70
+ },
71
+ ],
58
72
  },
73
+
59
74
  plugins: [
60
- // Copy Cesium Assets, Widgets, and Workers to a static directory used at runtime
75
+ // Copy Cesium Assets, Widgets, Workers, and ThirdParty
61
76
  new CopyWebpackPlugin({
62
77
  patterns: [
63
- { from: path.join(cesiumBuild, 'Workers'), to: path.resolve(__dirname, 'service/3d/Workers') },
64
- { from: path.join(cesiumBuild, 'Assets'), to: path.resolve(__dirname, 'service/3d/Assets') },
65
- { from: path.join(cesiumBuild, 'Widgets'), to: path.resolve(__dirname, 'service/3d/Widgets') },
66
- { from: path.join(cesiumBuild, 'ThirdParty'), to: path.resolve(__dirname, 'service/3d/ThirdParty') },
78
+ { from: `${cesiumUnmin}/Assets`, to: path.resolve(__dirname, "service/3d/Assets") },
79
+ { from: `${cesiumUnmin}/Workers`, to: path.resolve(__dirname, "service/3d/Workers") },
80
+ { from: `${cesiumUnmin}/Widgets`, to: path.resolve(__dirname, "service/3d/Widgets") },
81
+ { from: `${cesiumUnmin}/ThirdParty`, to: path.resolve(__dirname, "service/3d/ThirdParty") },
82
+ {
83
+ from: `${cesiumUnmin}/Cesium.js`,
84
+ to: path.resolve(__dirname, "service/3d/Cesium.js"),
85
+ },
67
86
  ],
68
87
  }),
88
+
69
89
  new webpack.ProvidePlugin({
70
- process: require.resolve('process/browser.js'),
90
+ process: require.resolve("process/browser.js"),
71
91
  }),
92
+
72
93
  new webpack.DefinePlugin({
73
- // Define relative base path in cesium for loading assets
74
- CESIUM_BASE_URL: JSON.stringify('/service/3d/'),
94
+ CESIUM_BASE_URL: JSON.stringify("/service/3d/"),
75
95
  }),
76
96
  ],
77
- mode: 'production',
97
+
98
+ mode: "production",
78
99
  };
@@ -1 +0,0 @@
1
- (self.webpackChunkDroneView=self.webpackChunkDroneView||[]).push([[486],{486:()=>{}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunkDroneView=self.webpackChunkDroneView||[]).push([[514],{5514:()=>{}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunkDroneView=self.webpackChunkDroneView||[]).push([[645],{645:()=>{}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunkDroneView=self.webpackChunkDroneView||[]).push([[800],{5800:()=>{}}]);
@@ -1,14 +0,0 @@
1
- (self["webpackChunkDroneView"] = self["webpackChunkDroneView"] || []).push([["_382d"],{
2
-
3
- /***/ "?382d":
4
- /*!*********************!*\
5
- !*** url (ignored) ***!
6
- \*********************/
7
- /***/ (() => {
8
-
9
- /* (ignored) */
10
-
11
- /***/ })
12
-
13
- }]);
14
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiXzM4MmQuZHJvbmVWaWV3LmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Ecm9uZVZpZXcvaWdub3JlZHwvaG9tZS9zdXBlcm1hbi9BcHAvRHJvbmUvRHJvbmUtYXBwL2Ryb25lX3ZpZXdfM2Qvbm9kZV9tb2R1bGVzL0BjZXNpdW0vZW5naW5lL1NvdXJjZS9Db3JlfHVybCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiAoaWdub3JlZCkgKi8iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=
@@ -1,14 +0,0 @@
1
- (self["webpackChunkDroneView"] = self["webpackChunkDroneView"] || []).push([["_6b2a"],{
2
-
3
- /***/ "?6b2a":
4
- /*!**********************!*\
5
- !*** zlib (ignored) ***!
6
- \**********************/
7
- /***/ (() => {
8
-
9
- /* (ignored) */
10
-
11
- /***/ })
12
-
13
- }]);
14
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiXzZiMmEuZHJvbmVWaWV3LmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Ecm9uZVZpZXcvaWdub3JlZHwvaG9tZS9zdXBlcm1hbi9BcHAvRHJvbmUvRHJvbmUtYXBwL2Ryb25lX3ZpZXdfM2Qvbm9kZV9tb2R1bGVzL0BjZXNpdW0vZW5naW5lL1NvdXJjZS9Db3JlfHpsaWIiXSwic291cmNlc0NvbnRlbnQiOlsiLyogKGlnbm9yZWQpICovIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9
@@ -1,14 +0,0 @@
1
- (self["webpackChunkDroneView"] = self["webpackChunkDroneView"] || []).push([["_9839"],{
2
-
3
- /***/ "?9839":
4
- /*!***********************!*\
5
- !*** https (ignored) ***!
6
- \***********************/
7
- /***/ (() => {
8
-
9
- /* (ignored) */
10
-
11
- /***/ })
12
-
13
- }]);
14
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiXzk4MzkuZHJvbmVWaWV3LmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Ecm9uZVZpZXcvaWdub3JlZHwvaG9tZS9zdXBlcm1hbi9BcHAvRHJvbmUvRHJvbmUtYXBwL2Ryb25lX3ZpZXdfM2Qvbm9kZV9tb2R1bGVzL0BjZXNpdW0vZW5naW5lL1NvdXJjZS9Db3JlfGh0dHBzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIChpZ25vcmVkKSAqLyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==
@@ -1,14 +0,0 @@
1
- (self["webpackChunkDroneView"] = self["webpackChunkDroneView"] || []).push([["_afdc"],{
2
-
3
- /***/ "?afdc":
4
- /*!**********************!*\
5
- !*** http (ignored) ***!
6
- \**********************/
7
- /***/ (() => {
8
-
9
- /* (ignored) */
10
-
11
- /***/ })
12
-
13
- }]);
14
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiX2FmZGMuZHJvbmVWaWV3LmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Ecm9uZVZpZXcvaWdub3JlZHwvaG9tZS9zdXBlcm1hbi9BcHAvRHJvbmUvRHJvbmUtYXBwL2Ryb25lX3ZpZXdfM2Qvbm9kZV9tb2R1bGVzL0BjZXNpdW0vZW5naW5lL1NvdXJjZS9Db3JlfGh0dHAiXSwic291cmNlc0NvbnRlbnQiOlsiLyogKGlnbm9yZWQpICovIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9