@salesforce/plugin-lightning-dev 1.0.26-alpha.0

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.
Files changed (39) hide show
  1. package/LICENSE.txt +12 -0
  2. package/README.md +225 -0
  3. package/lib/commands/lightning/dev/app.d.ts +29 -0
  4. package/lib/commands/lightning/dev/app.js +288 -0
  5. package/lib/commands/lightning/dev/app.js.map +1 -0
  6. package/lib/commands/lightning/dev/site.d.ts +12 -0
  7. package/lib/commands/lightning/dev/site.js +77 -0
  8. package/lib/commands/lightning/dev/site.js.map +1 -0
  9. package/lib/configMeta.d.ts +28 -0
  10. package/lib/configMeta.js +74 -0
  11. package/lib/configMeta.js.map +1 -0
  12. package/lib/index.d.ts +2 -0
  13. package/lib/index.js +8 -0
  14. package/lib/index.js.map +1 -0
  15. package/lib/lwc-dev-server/index.d.ts +7 -0
  16. package/lib/lwc-dev-server/index.js +102 -0
  17. package/lib/lwc-dev-server/index.js.map +1 -0
  18. package/lib/shared/configUtils.d.ts +27 -0
  19. package/lib/shared/configUtils.js +108 -0
  20. package/lib/shared/configUtils.js.map +1 -0
  21. package/lib/shared/experience/expSite.d.ts +70 -0
  22. package/lib/shared/experience/expSite.js +200 -0
  23. package/lib/shared/experience/expSite.js.map +1 -0
  24. package/lib/shared/orgUtils.d.ts +14 -0
  25. package/lib/shared/orgUtils.js +36 -0
  26. package/lib/shared/orgUtils.js.map +1 -0
  27. package/lib/shared/previewUtils.d.ts +126 -0
  28. package/lib/shared/previewUtils.js +397 -0
  29. package/lib/shared/previewUtils.js.map +1 -0
  30. package/lib/shared/prompt.d.ts +4 -0
  31. package/lib/shared/prompt.js +25 -0
  32. package/lib/shared/prompt.js.map +1 -0
  33. package/messages/lightning.dev.app.md +171 -0
  34. package/messages/lightning.dev.site.md +37 -0
  35. package/messages/shared.utils.md +27 -0
  36. package/npm-shrinkwrap.json +29260 -0
  37. package/oclif.lock +15886 -0
  38. package/oclif.manifest.json +174 -0
  39. package/package.json +226 -0
@@ -0,0 +1,174 @@
1
+ {
2
+ "commands": {
3
+ "lightning:dev:app": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Use Local Dev (Beta) to see local changes to your app in a real-time preview that you don't have to deploy or manually refresh. To let you quickly iterate on your Lightning web components (LWCs) and pages, your app preview automatically refreshes when Local Dev detects source code changes.\n\nWhen you edit these local files with Local Dev enabled, your org automatically reflects these changes.\n\n- Basic HTML and CSS edits to LWCs\n- JavaScript changes to LWCs that don't affect the component's public API\n- Importing new custom LWCs\n- Importing another instance of an existing LWC\n\nTo apply any other local changes not listed above, you must deploy them to your org using the `sf project deploy start` command.\n\nWhen you make changes directly in your org (like saving new component properties), they're automatically deployed to your live app. To update your local version of the app with those changes, you must retrieve them from your org using the `sf project retrieve start` command.\n\nTo learn more about Local Dev enablement, considerations, and limitations, see the Lightning Web Components Developer Guide.",
7
+ "examples": [
8
+ "Preview the default app for the target org \"myOrg\" in a desktop environment:\n<%= config.bin %> <%= command.id %> --target-org myOrg",
9
+ "Preview the app \"myApp\" for the target org \"myOrg\" in a desktop environment:\n<%= config.bin %> <%= command.id %> --name MyApp --target-org myOrg --device-type desktop",
10
+ "Preview the default app for target org \"myOrg\" on an iOS device:\n<%= config.bin %> <%= command.id %> --target-org myOrg --device-type ios --device-id \"iPhone 15 Pro Max\""
11
+ ],
12
+ "flags": {
13
+ "json": {
14
+ "description": "Format output as json.",
15
+ "helpGroup": "GLOBAL",
16
+ "name": "json",
17
+ "allowNo": false,
18
+ "type": "boolean"
19
+ },
20
+ "flags-dir": {
21
+ "helpGroup": "GLOBAL",
22
+ "name": "flags-dir",
23
+ "summary": "Import flag values from a directory.",
24
+ "hasDynamicHelp": false,
25
+ "multiple": false,
26
+ "type": "option"
27
+ },
28
+ "name": {
29
+ "char": "n",
30
+ "name": "name",
31
+ "summary": "Name of the Lightning Experience app to preview.",
32
+ "hasDynamicHelp": false,
33
+ "multiple": false,
34
+ "type": "option"
35
+ },
36
+ "target-org": {
37
+ "char": "o",
38
+ "name": "target-org",
39
+ "noCacheDefault": true,
40
+ "required": true,
41
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
42
+ "hasDynamicHelp": true,
43
+ "multiple": false,
44
+ "type": "option"
45
+ },
46
+ "device-type": {
47
+ "char": "t",
48
+ "name": "device-type",
49
+ "summary": "Type of device to display the app preview.",
50
+ "default": "desktop",
51
+ "hasDynamicHelp": false,
52
+ "multiple": false,
53
+ "options": [
54
+ "desktop",
55
+ "ios",
56
+ "android"
57
+ ],
58
+ "type": "option"
59
+ },
60
+ "device-id": {
61
+ "char": "i",
62
+ "name": "device-id",
63
+ "summary": "ID of the mobile device to display the preview if device type is set to `ios` or `android`. The default value is the ID of the first available mobile device.",
64
+ "hasDynamicHelp": false,
65
+ "multiple": false,
66
+ "type": "option"
67
+ }
68
+ },
69
+ "hasDynamicHelp": true,
70
+ "hiddenAliases": [],
71
+ "id": "lightning:dev:app",
72
+ "pluginAlias": "@salesforce/plugin-lightning-dev",
73
+ "pluginName": "@salesforce/plugin-lightning-dev",
74
+ "pluginType": "core",
75
+ "strict": true,
76
+ "summary": "Preview a Lightning Experience app locally and in real-time, without deploying it.",
77
+ "enableJsonFlag": true,
78
+ "isESM": true,
79
+ "relativePath": [
80
+ "lib",
81
+ "commands",
82
+ "lightning",
83
+ "dev",
84
+ "app.js"
85
+ ],
86
+ "aliasPermutations": [],
87
+ "permutations": [
88
+ "lightning:dev:app",
89
+ "dev:lightning:app",
90
+ "dev:app:lightning",
91
+ "lightning:app:dev",
92
+ "app:lightning:dev",
93
+ "app:dev:lightning"
94
+ ]
95
+ },
96
+ "lightning:dev:site": {
97
+ "aliases": [],
98
+ "args": {},
99
+ "description": "Enable Local Dev to see local changes to your site in a real-time preview that you don't have to deploy or manually refresh. To let you quickly iterate on your Lightning web components (LWCs) and pages, your site preview automatically refreshes when Local Dev detects source code changes.\n\nWhen you edit these local files with Local Dev enabled, your org automatically reflects these changes.\n\n- Basic HTML and CSS edits to LWCs\n- JavaScript changes to LWCs that don't affect the component's public API\n- Importing new custom LWCs\n- Importing another instance of an existing LWC\n\nTo apply any other local changes not listed above, you must deploy them to your org using the `sf project deploy start` command. Then republish your site and restart the server for the Local Dev experience.\n\nFor more considerations and limitations, see the Lightning Web Components Developer Guide.",
100
+ "examples": [
101
+ "Preview the site \"Partner Central\" from the org \"myOrg\":\n<%= config.bin %> <%= command.id %> --name \"Partner Central\" --target-org myOrg",
102
+ "Preview the site \"Partner Central\" from the org \"myOrg\" with Node Inspector enabled:\n<%= config.bin %> <%= command.id %> --name \"Partner Central\" --target-org myOrg --debug"
103
+ ],
104
+ "flags": {
105
+ "json": {
106
+ "description": "Format output as json.",
107
+ "helpGroup": "GLOBAL",
108
+ "name": "json",
109
+ "allowNo": false,
110
+ "type": "boolean"
111
+ },
112
+ "flags-dir": {
113
+ "helpGroup": "GLOBAL",
114
+ "name": "flags-dir",
115
+ "summary": "Import flag values from a directory.",
116
+ "hasDynamicHelp": false,
117
+ "multiple": false,
118
+ "type": "option"
119
+ },
120
+ "name": {
121
+ "char": "n",
122
+ "name": "name",
123
+ "required": false,
124
+ "summary": "Name of the Experience Builder site to preview. It has to match a site name from the current org.",
125
+ "hasDynamicHelp": false,
126
+ "multiple": false,
127
+ "type": "option"
128
+ },
129
+ "debug": {
130
+ "name": "debug",
131
+ "summary": "Enable Node Inspector to debug server-side rendering.",
132
+ "allowNo": false,
133
+ "type": "boolean"
134
+ },
135
+ "target-org": {
136
+ "char": "o",
137
+ "name": "target-org",
138
+ "noCacheDefault": true,
139
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
140
+ "hasDynamicHelp": true,
141
+ "multiple": false,
142
+ "type": "option"
143
+ }
144
+ },
145
+ "hasDynamicHelp": true,
146
+ "hiddenAliases": [],
147
+ "id": "lightning:dev:site",
148
+ "pluginAlias": "@salesforce/plugin-lightning-dev",
149
+ "pluginName": "@salesforce/plugin-lightning-dev",
150
+ "pluginType": "core",
151
+ "strict": true,
152
+ "summary": "Preview an Experience Builder site locally and in real-time, without deploying it.",
153
+ "enableJsonFlag": true,
154
+ "isESM": true,
155
+ "relativePath": [
156
+ "lib",
157
+ "commands",
158
+ "lightning",
159
+ "dev",
160
+ "site.js"
161
+ ],
162
+ "aliasPermutations": [],
163
+ "permutations": [
164
+ "lightning:dev:site",
165
+ "dev:lightning:site",
166
+ "dev:site:lightning",
167
+ "lightning:site:dev",
168
+ "site:lightning:dev",
169
+ "site:dev:lightning"
170
+ ]
171
+ }
172
+ },
173
+ "version": "1.0.26-alpha.0"
174
+ }
package/package.json ADDED
@@ -0,0 +1,226 @@
1
+ {
2
+ "name": "@salesforce/plugin-lightning-dev",
3
+ "description": "Lightning development tools for LEX, Mobile, and Experience Sites",
4
+ "version": "1.0.26-alpha.0",
5
+ "author": "Salesforce",
6
+ "bugs": "https://github.com/forcedotcom/cli/issues",
7
+ "dependencies": {
8
+ "@lwrjs/api": "0.14.0",
9
+ "@lwc/lwc-dev-server": "^9.4.0",
10
+ "@lwc/sfdc-lwc-compiler": "^9.4.0",
11
+ "@oclif/core": "^4.0.17",
12
+ "@salesforce/core": "^8.2.7",
13
+ "@salesforce/kit": "^3.1.6",
14
+ "@salesforce/lwc-dev-mobile-core": "4.0.0-alpha.7",
15
+ "@salesforce/sf-plugins-core": "^11.2.4",
16
+ "@inquirer/select": "^2.4.7",
17
+ "@inquirer/prompts": "^5.3.8",
18
+ "chalk": "^5.3.0",
19
+ "lwc": "7.1.3",
20
+ "lwr": "0.14.0",
21
+ "node-fetch": "^3.3.2",
22
+ "tar": "^7.4.3"
23
+ },
24
+ "devDependencies": {
25
+ "@oclif/plugin-command-snapshot": "^5.2.12",
26
+ "@salesforce/cli-plugins-testkit": "^5.3.25",
27
+ "@salesforce/dev-scripts": "^10.2.7",
28
+ "@salesforce/plugin-command-reference": "^3.1.13",
29
+ "@types/node-fetch": "^2.6.11",
30
+ "@types/tar": "^6.1.13",
31
+ "eslint-plugin-sf-plugin": "^1.20.1",
32
+ "esmock": "^2.6.7",
33
+ "oclif": "^4.14.12",
34
+ "ts-node": "^10.9.2",
35
+ "typescript": "^5.5.4"
36
+ },
37
+ "engines": {
38
+ "node": ">=18.0.0 <22"
39
+ },
40
+ "files": [
41
+ "/lib",
42
+ "/messages",
43
+ "/npm-shrinkwrap.json",
44
+ "/oclif.lock",
45
+ "/oclif.manifest.json",
46
+ "/schemas"
47
+ ],
48
+ "homepage": "https://github.com/salesforcecli/plugin-lightning-dev",
49
+ "keywords": [
50
+ "force",
51
+ "salesforce",
52
+ "salesforcedx",
53
+ "sf",
54
+ "sf-plugin",
55
+ "sfdx",
56
+ "sfdx-plugin"
57
+ ],
58
+ "license": "BSD-3-Clause",
59
+ "oclif": {
60
+ "commands": "./lib/commands",
61
+ "bin": "sf",
62
+ "configMeta": "./lib/configMeta",
63
+ "topicSeparator": " ",
64
+ "devPlugins": [
65
+ "@oclif/plugin-help",
66
+ "@oclif/plugin-command-snapshot",
67
+ "@salesforce/plugin-command-reference"
68
+ ],
69
+ "topics": {
70
+ "lightning": {
71
+ "external": true,
72
+ "subtopics": {
73
+ "dev": {
74
+ "description": "Preview applications and sites locally and in real-time, without deploying them."
75
+ }
76
+ }
77
+ }
78
+ },
79
+ "flexibleTaxonomy": true
80
+ },
81
+ "repository": "salesforcecli/plugin-lightning-dev",
82
+ "scripts": {
83
+ "build": "wireit",
84
+ "clean": "sf-clean",
85
+ "clean-all": "sf-clean all",
86
+ "compile": "wireit",
87
+ "docs": "sf-docs",
88
+ "format": "wireit",
89
+ "link-check": "wireit",
90
+ "link-lwr": "yarn link @lwrjs/api @lwrjs/app-service @lwrjs/asset-registry @lwrjs/asset-transformer @lwrjs/auth-middleware @lwrjs/base-view-provider @lwrjs/base-view-transformer @lwrjs/client-modules @lwrjs/config @lwrjs/core @lwrjs/dev-proxy-server @lwrjs/diagnostics @lwrjs/esbuild @lwrjs/everywhere @lwrjs/fs-asset-provider @lwrjs/fs-watch @lwrjs/html-view-provider @lwrjs/instrumentation @lwrjs/label-module-provider @lwrjs/lambda @lwrjs/legacy-npm-module-provider @lwrjs/loader @lwrjs/lwc-module-provider @lwrjs/lwc-ssr @lwrjs/markdown-view-provider @lwrjs/module-bundler @lwrjs/module-registry @lwrjs/npm-module-provider @lwrjs/nunjucks-view-provider @lwrjs/o11y @lwrjs/resource-registry @lwrjs/router @lwrjs/security @lwrjs/server @lwrjs/shared-utils @lwrjs/static @lwrjs/tools @lwrjs/types @lwrjs/view-registry lwr",
91
+ "lint": "wireit",
92
+ "postpack": "sf-clean --ignore-signing-artifacts",
93
+ "prepack": "sf-prepack",
94
+ "prepare": "sf-install",
95
+ "test": "wireit",
96
+ "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
97
+ "test:only": "wireit",
98
+ "unlink-lwr": "yarn unlink @lwrjs/api @lwrjs/app-service @lwrjs/asset-registry @lwrjs/asset-transformer @lwrjs/auth-middleware @lwrjs/base-view-provider @lwrjs/base-view-transformer @lwrjs/client-modules @lwrjs/config @lwrjs/core @lwrjs/dev-proxy-server @lwrjs/diagnostics @lwrjs/esbuild @lwrjs/everywhere @lwrjs/fs-asset-provider @lwrjs/fs-watch @lwrjs/html-view-provider @lwrjs/instrumentation @lwrjs/label-module-provider @lwrjs/lambda @lwrjs/legacy-npm-module-provider @lwrjs/loader @lwrjs/lwc-module-provider @lwrjs/lwc-ssr @lwrjs/markdown-view-provider @lwrjs/module-bundler @lwrjs/module-registry @lwrjs/npm-module-provider @lwrjs/nunjucks-view-provider @lwrjs/o11y @lwrjs/resource-registry @lwrjs/router @lwrjs/security @lwrjs/server @lwrjs/shared-utils @lwrjs/static @lwrjs/tools @lwrjs/types @lwrjs/view-registry lwr",
99
+ "update-snapshots": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" snapshot:generate",
100
+ "version": "oclif readme"
101
+ },
102
+ "publishConfig": {
103
+ "access": "public"
104
+ },
105
+ "wireit": {
106
+ "build": {
107
+ "dependencies": [
108
+ "compile",
109
+ "lint"
110
+ ]
111
+ },
112
+ "compile": {
113
+ "command": "tsc -p . --pretty --incremental",
114
+ "files": [
115
+ "src/**/*.ts",
116
+ "**/tsconfig.json",
117
+ "messages/**"
118
+ ],
119
+ "output": [
120
+ "lib/**",
121
+ "*.tsbuildinfo"
122
+ ],
123
+ "clean": "if-file-deleted"
124
+ },
125
+ "format": {
126
+ "command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
127
+ "files": [
128
+ "src/**/*.ts",
129
+ "test/**/*.ts",
130
+ "schemas/**/*.json",
131
+ "command-snapshot.json",
132
+ ".prettier*"
133
+ ],
134
+ "output": []
135
+ },
136
+ "lint": {
137
+ "command": "eslint src test --color --cache --cache-location .eslintcache",
138
+ "files": [
139
+ "src/**/*.ts",
140
+ "test/**/*.ts",
141
+ "messages/**",
142
+ "**/.eslint*",
143
+ "**/tsconfig.json"
144
+ ],
145
+ "output": []
146
+ },
147
+ "test:compile": {
148
+ "command": "tsc -p \"./test\" --pretty",
149
+ "files": [
150
+ "test/**/*.ts",
151
+ "**/tsconfig.json"
152
+ ],
153
+ "output": []
154
+ },
155
+ "test": {
156
+ "dependencies": [
157
+ "test:compile",
158
+ "test:only",
159
+ "test:command-reference",
160
+ "test:deprecation-policy",
161
+ "lint",
162
+ "test:json-schema",
163
+ "link-check"
164
+ ]
165
+ },
166
+ "test:only": {
167
+ "command": "nyc mocha \"test/**/*.test.ts\"",
168
+ "env": {
169
+ "FORCE_COLOR": "2"
170
+ },
171
+ "files": [
172
+ "test/**/*.ts",
173
+ "src/**/*.ts",
174
+ "**/tsconfig.json",
175
+ ".mocha*",
176
+ "!*.nut.ts",
177
+ ".nycrc"
178
+ ],
179
+ "output": []
180
+ },
181
+ "test:command-reference": {
182
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference:generate --erroronwarnings",
183
+ "files": [
184
+ "src/**/*.ts",
185
+ "messages/**",
186
+ "package.json"
187
+ ],
188
+ "output": [
189
+ "tmp/root"
190
+ ]
191
+ },
192
+ "test:deprecation-policy": {
193
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" snapshot:compare",
194
+ "files": [
195
+ "src/**/*.ts"
196
+ ],
197
+ "output": [],
198
+ "dependencies": [
199
+ "compile"
200
+ ]
201
+ },
202
+ "test:json-schema": {
203
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" schema:compare",
204
+ "files": [
205
+ "src/**/*.ts",
206
+ "schemas"
207
+ ],
208
+ "output": []
209
+ },
210
+ "link-check": {
211
+ "command": "node -e \"process.exit(process.env.CI ? 0 : 1)\" || linkinator \"**/*.md\" --skip \"CHANGELOG.md|node_modules|test/|confluence.internal.salesforce.com|my.salesforce.com|%s\" --markdown --retry --directory-listing --verbosity error",
212
+ "files": [
213
+ "./*.md",
214
+ "./!(CHANGELOG).md",
215
+ "messages/**/*.md"
216
+ ],
217
+ "output": []
218
+ }
219
+ },
220
+ "exports": "./lib/index.js",
221
+ "type": "module",
222
+ "sfdx": {
223
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-lightning-dev/1.0.26-alpha.0.crt",
224
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-lightning-dev/1.0.26-alpha.0.sig"
225
+ }
226
+ }