@todesktop/cli 1.17.0 → 1.18.1

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/dist/types.d.ts CHANGED
@@ -26,6 +26,23 @@ export type AppProtocolSchemeProperty = string | [string, ...string[]];
26
26
  * This is the path to your Electron application directory. Omit this unless your project setup is complicated. This is the directory that the CLI uploads.
27
27
  */
28
28
  export type AppPathProperty = string;
29
+ /**
30
+ * Compile selected source files to .jsc using Bytenode during the build. Provide glob patterns relative to your appPath.
31
+ */
32
+ export type BytenodeConfigProperty = {
33
+ [k: string]: unknown;
34
+ } & {
35
+ /**
36
+ * Enable Bytenode compilation.
37
+ */
38
+ enabled?: boolean;
39
+ /**
40
+ * Glob patterns relative to appPath for files to compile to Bytenode.
41
+ *
42
+ * @minItems 1
43
+ */
44
+ files?: [string, ...string[]];
45
+ };
29
46
  /**
30
47
  * Whether to package your application's source code within an asar archive. You should only turn this off if you have a good reason to.
31
48
  */
@@ -197,6 +214,7 @@ export interface Schema {
197
214
  */
198
215
  enabled?: boolean;
199
216
  };
217
+ bytenode?: BytenodeConfigProperty;
200
218
  asar?: AsarProperty;
201
219
  asarUnpack?: AsarUnpackProperty;
202
220
  buildVersion?: BuildVersionProperty;
@@ -484,6 +502,7 @@ export interface PlatformOverridableProperties {
484
502
  appFiles?: AppFilesProperty;
485
503
  appProtocolScheme?: AppProtocolSchemeProperty;
486
504
  appPath?: AppPathProperty;
505
+ bytenode?: BytenodeConfigProperty;
487
506
  asar?: AsarProperty;
488
507
  asarUnpack?: AsarUnpackProperty;
489
508
  buildVersion?: BuildVersionProperty;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "name": "@todesktop/cli",
7
- "version": "1.17.0",
7
+ "version": "1.18.1",
8
8
  "license": "MIT",
9
9
  "author": "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
10
10
  "homepage": "https://todesktop.com/cli",
@@ -19,23 +19,20 @@
19
19
  "node": ">=16"
20
20
  },
21
21
  "scripts": {
22
- "dev": "cp-cli dev.env .env && npm run build:dev && npm link",
23
- "dev:prod": "cp-cli prod.env .env && npm run build && npm link",
24
- "dev:local:prod": "cp-cli prod-local.env .env && npm run build && npm link && cp-cli prod-local.env .env",
25
- "build": "npm run types:generate && esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli prod.env .env",
26
- "build:dev": "npm run types:generate && esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli dev.env .env",
27
- "lint": "npm run lint:types && npm run lint:styles",
28
- "lint:styles": "eslint src test .eslintrc.js && prettier --check .",
29
- "format": "prettier --write .",
30
- "lint:types": "tsc && tsc-strict",
31
- "lint--fix": "eslint src test --fix",
22
+ "build": "node scripts/esbuild.js",
23
+ "dev": "node scripts/esbuild.js --link --watch --stage dev",
24
+ "dev:local:prod": "node scripts/esbuild.js --link --watch --stage prod-local",
25
+ "dev:prod": "node scripts/esbuild.js --link --watch",
32
26
  "docs:generate": "node scripts/generate-readme.js",
27
+ "format": "prettier . --write && eslint --fix",
28
+ "lint": "prettier . --check && eslint",
33
29
  "types:generate": "node scripts/generate-types.js",
34
- "release": "npm run docs:generate && npm run build && npx np --tag=latest",
30
+ "release": "npm run docs:generate && npm run build && pnpx np --tag=latest",
35
31
  "release-beta": "npm run docs:generate && npm run build && npx np --any-branch --no-tests --tag=beta",
36
32
  "test": "ava",
33
+ "test:e2e": "node test/output-snapshots/output.test.js",
37
34
  "test--watch": "npm test -- --watch",
38
- "postinstall": "node scripts/postinstall.js"
35
+ "typecheck": "tsc --noEmit"
39
36
  },
40
37
  "files": [
41
38
  "scripts/postinstall.js",
@@ -90,38 +87,27 @@
90
87
  "xdg-basedir": "^4.0.0"
91
88
  },
92
89
  "devDependencies": {
90
+ "@todesktop/dev-config": "workspace:*",
93
91
  "@todesktop/shared": "^7.189.6",
94
92
  "@types/bunyan": "^1.8.6",
95
93
  "@types/is-ci": "^3.0.4",
96
94
  "@types/node": "^20.8.4",
97
95
  "@types/react": "^18.0.26",
98
- "@typescript-eslint/eslint-plugin": "^5.46.1",
99
- "@typescript-eslint/parser": "^5.46.1",
100
96
  "ava": "^4.3.1",
101
97
  "cp-cli": "^2.0.0",
102
- "esbuild": "^0.16.5",
98
+ "esbuild": "^0.25.10",
103
99
  "esbuild-register": "^3.4.1",
104
- "eslint": "^8.29.0",
105
- "eslint-config-prettier": "^8.5.0",
106
- "eslint-plugin-import": "^2.26.0",
107
- "eslint-plugin-node": "^11.1.0",
108
- "eslint-plugin-prettier": "^4.2.1",
109
- "eslint-plugin-promise": "^6.1.1",
110
- "eslint-plugin-react": "^7.31.11",
111
- "eslint-plugin-react-hooks": "^4.6.0",
112
- "eslint-plugin-standard": "^4.1.0",
100
+ "eslint": "catalog:",
113
101
  "execa": "^4.0.3",
114
102
  "extract-zip": "^2.0.1",
115
103
  "fs-extra": "^9.0.1",
116
- "husky": "^4.3.0",
117
104
  "ink-testing-library": "^2.1.0",
118
105
  "json-schema-to-typescript": "^15.0.4",
119
- "lint-staged": "^10.2.11",
120
106
  "package-json-type": "^1.0.3",
121
- "prettier": "^2.8.1",
107
+ "prettier": "catalog:",
122
108
  "proxyquire": "^2.1.3",
123
109
  "sinon": "^9.0.3",
124
- "typescript": "^4.9.4",
110
+ "typescript": "catalog:",
125
111
  "typescript-strict-plugin": "^2.2.1"
126
112
  },
127
113
  "ava": {
@@ -144,29 +130,6 @@
144
130
  ],
145
131
  "timeout": "10m"
146
132
  },
147
- "lint-staged": {
148
- "**/*.{js,ts,tsx}": [
149
- "eslint src --fix",
150
- "git add"
151
- ]
152
- },
153
- "husky": {
154
- "hooks": {
155
- "pre-commit": "lint-staged"
156
- }
157
- },
158
- "overrides": {
159
- "pastel": {
160
- "parcel-bundler": {
161
- "deasync": "0.1.27"
162
- }
163
- }
164
- },
165
- "resolutions": {
166
- "pastel/parcel-bundler/deasync": "0.1.24",
167
- "ink": "3.2.0",
168
- "react": "17.0.2"
169
- },
170
133
  "packageExtensions": {
171
134
  "ink-progress-bar@*": {
172
135
  "dependencies": {
@@ -40,6 +40,7 @@
40
40
  }
41
41
  }
42
42
  },
43
+ "bytenode": { "$ref": "#/definitions/bytenodeConfigProperty" },
43
44
  "asar": { "$ref": "#/definitions/asarProperty" },
44
45
  "asarUnpack": { "$ref": "#/definitions/asarUnpackProperty" },
45
46
  "buildVersion": { "$ref": "#/definitions/buildVersionProperty" },
@@ -132,6 +133,34 @@
132
133
  "examples": ["com.microsoft.word"],
133
134
  "default": "auto-generated"
134
135
  },
136
+ "bytenodeConfigProperty": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "description": "Compile selected source files to .jsc using Bytenode during the build. Provide glob patterns relative to your appPath.",
140
+ "default": { "enabled": false },
141
+ "properties": {
142
+ "enabled": {
143
+ "type": "boolean",
144
+ "default": false,
145
+ "description": "Enable Bytenode compilation."
146
+ },
147
+ "files": {
148
+ "type": "array",
149
+ "items": { "type": "string", "minLength": 1 },
150
+ "minItems": 1,
151
+ "description": "Glob patterns relative to appPath for files to compile to Bytenode."
152
+ }
153
+ },
154
+ "allOf": [
155
+ {
156
+ "if": {
157
+ "properties": { "enabled": { "const": true } },
158
+ "required": ["enabled"]
159
+ },
160
+ "then": { "required": ["files"] }
161
+ }
162
+ ]
163
+ },
135
164
  "appFilesProperty": {
136
165
  "type": "array",
137
166
  "description": "This option allows you to decide which files get uploaded to be built on the ToDesktop servers. By default, all files in your app path are included in your app, except for `node_modules` and `.git`. Dependencies are installed on our build servers as there could be platform-specific postinstall steps.",
@@ -815,7 +844,7 @@
815
844
  "description": "The path to your application's Windows desktop icon. It must be an ICO, ICNS, or PNG.",
816
845
  "examples": ["./icon.ico"],
817
846
  "file": {
818
- "extensions": ["icns", "png", "icon"],
847
+ "extensions": ["icns", "png", "ico"],
819
848
  "mustBeFile": true
820
849
  },
821
850
  "minLength": 3
@@ -880,6 +909,7 @@
880
909
  "$ref": "#/definitions/appProtocolSchemeProperty"
881
910
  },
882
911
  "appPath": { "$ref": "#/definitions/appPathProperty" },
912
+ "bytenode": { "$ref": "#/definitions/bytenodeConfigProperty" },
883
913
  "asar": { "$ref": "#/definitions/asarProperty" },
884
914
  "asarUnpack": { "$ref": "#/definitions/asarUnpackProperty" },
885
915
  "buildVersion": { "$ref": "#/definitions/buildVersionProperty" },
@@ -1,19 +0,0 @@
1
- // eslint-disable-next-line @typescript-eslint/no-var-requires
2
- const path = require("path");
3
-
4
- console.log(`
5
- Thank you for installing @todesktop/cli!
6
-
7
- To enable JSON validation and IntelliSense for your configuration files, please add the following to your VSCode/Cursor settings:
8
-
9
- {
10
- "json.schemas": [
11
- {
12
- "fileMatch": ["todesktop.json", "todesktop.*.json"],
13
- "url": "${path
14
- .resolve(__dirname, "../", "schemas", "schema.json")
15
- .substring(1)}"
16
- }
17
- ]
18
- }
19
- `);