@squidcloud/cli 1.0.145 → 1.0.146-beta

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.
@@ -0,0 +1,80 @@
1
+ const TerserPlugin = require('terser-webpack-plugin');
2
+ const CopyPlugin = require('copy-webpack-plugin');
3
+ const ZipPlugin = require('zip-webpack-plugin');
4
+ const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');
5
+ const path = require('path');
6
+
7
+ module.exports = function (env, argv) {
8
+ const isProduction = argv.mode === 'production';
9
+ return {
10
+ entry: './src/index.ts',
11
+ target: 'node',
12
+ mode: isProduction ? 'production' : 'none',
13
+ devtool: 'source-map',
14
+ externalsPresets: { node: true },
15
+ externals: {
16
+ // Do not bundle Puppeteer. Squid provides a pre-installed version of the library.
17
+ 'puppeteer': 'commonjs puppeteer',
18
+ // Optional peer dependencies for 'ws' library.
19
+ // Do not include them to avoid build time warnings
20
+ // on platforms where these modules are not available.
21
+ 'bufferutil': 'commonjs bufferutil',
22
+ 'utf-8-validate': 'commonjs utf-8-validate',
23
+ },
24
+ output: {
25
+ path: path.resolve(process.cwd(), 'dist'),
26
+ filename: 'index.js',
27
+ library: {
28
+ type: 'commonjs',
29
+ },
30
+ },
31
+ optimization: isProduction
32
+ ? {
33
+ minimize: true,
34
+ minimizer: [
35
+ new TerserPlugin({
36
+ terserOptions: {
37
+ keep_classnames: true,
38
+ keep_fnames: true,
39
+ sourceMap: true,
40
+ },
41
+ }),
42
+ ],
43
+ }
44
+ : undefined,
45
+ plugins: [
46
+ new CopyPlugin({
47
+ patterns: [
48
+ { from: 'src/public', to: 'public', noErrorOnMissing: true },
49
+ {
50
+ from: 'dist/openapi-spec-and-controllers.json',
51
+ to: '',
52
+ noErrorOnMissing: true,
53
+ },
54
+ ],
55
+ }),
56
+ new ZipPlugin({
57
+ path: path.resolve(process.cwd(), 'dist'),
58
+ filename: 'bundle.zip',
59
+ include: [/([0-9]*\.)?index.js(.map)?/, /^public\/.*$/, /.*\.json$/],
60
+ }),
61
+ ],
62
+ module: {
63
+ rules: [
64
+ {
65
+ test: /\.(ts|tsx)$/i,
66
+ loader: 'ts-loader',
67
+ exclude: /node_modules/,
68
+ },
69
+ {
70
+ test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i,
71
+ type: 'asset',
72
+ },
73
+ ],
74
+ },
75
+ resolve: {
76
+ plugins: [new TsconfigPathsPlugin()],
77
+ extensions: ['.tsx', '.ts', '.jsx', '.js'],
78
+ },
79
+ };
80
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@squidcloud/cli",
3
- "version": "1.0.145",
4
- "description": "The Squid Cloud CLI",
3
+ "version": "1.0.146-beta",
4
+ "description": "The Squid CLI",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "start": "node dist/index.js",
@@ -9,9 +9,10 @@
9
9
  "prebuild": "rimraf dist",
10
10
  "build": "webpack --mode=production",
11
11
  "build:dev": "webpack --mode=development",
12
- "build:prod": "webpack --mode=production",
12
+ "lint": "eslint",
13
+ "link": "npm run build && chmod 755 dist/index.js && npm link",
13
14
  "watch": "webpack --watch",
14
- "deploy": "npm run build && npm uninstall -g @squidcloud/cli && npm install -g .",
15
+ "deploy": "npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz",
15
16
  "publish:public": "npm run build && npm publish --access public"
16
17
  },
17
18
  "files": [
@@ -27,7 +28,23 @@
27
28
  "node": ">=18.0.0"
28
29
  },
29
30
  "dependencies": {
30
- "@squidcloud/schematics": "1.0.145",
31
- "@angular-devkit/schematics-cli": "v16-lts"
31
+ "@squidcloud/local-backend": "^1.0.146-beta",
32
+ "adm-zip": "^0.5.16",
33
+ "copy-webpack-plugin": "^12.0.2",
34
+ "decompress": "^4.2.1",
35
+ "nodemon": "^3.1.9",
36
+ "terser-webpack-plugin": "^5.3.10",
37
+ "ts-loader": "^9.5.1",
38
+ "ts-node": "^10.9.2",
39
+ "tsconfig-paths": "^4.2.0",
40
+ "tsconfig-paths-webpack-plugin": "^4.1.0",
41
+ "webpack": "^5.101.3",
42
+ "zip-webpack-plugin": "^4.0.1"
43
+ },
44
+ "devDependencies": {
45
+ "@types/adm-zip": "^0.5.7",
46
+ "@types/decompress": "^4.2.7",
47
+ "@types/node": "^20.19.9",
48
+ "terminal-link": "^3.0.0"
32
49
  }
33
50
  }
@@ -1,24 +0,0 @@
1
- /*!
2
- * mime-db
3
- * Copyright(c) 2014 Jonathan Ong
4
- * Copyright(c) 2015-2022 Douglas Christopher Wilson
5
- * MIT Licensed
6
- */
7
-
8
- /*!
9
- * mime-types
10
- * Copyright(c) 2014 Jonathan Ong
11
- * Copyright(c) 2015 Douglas Christopher Wilson
12
- * MIT Licensed
13
- */
14
-
15
- /**
16
- * @license
17
- * Lodash <https://lodash.com/>
18
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
19
- * Released under MIT license <https://lodash.com/license>
20
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
21
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
22
- */
23
-
24
- /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */