@enfocussw/switch-scripting-context 25.11.0-beta.14 → 25.11.0-beta.15
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/CHANGELOG.md +21 -1
- package/README.md +26 -22
- package/dist/init.d.ts +1 -1
- package/dist/init.js +18 -7
- package/docs/switch-api/{api-connection.md → connection.md} +2 -2
- package/docs/switch-api/{api-document-classes.md → document-classes.md} +1 -1
- package/docs/switch-api/{api-entry-points.md → entry-points.md} +5 -5
- package/docs/switch-api/{api-execution-environment.md → execution-environment.md} +7 -7
- package/docs/switch-api/{api-flow-element.md → flow-element.md} +4 -4
- package/docs/switch-api/{api-job-patterns.md → job-patterns.md} +8 -8
- package/docs/switch-api/{api-job.md → job.md} +4 -4
- package/docs/switch-api/{api-logging.md → logging.md} +6 -6
- package/docs/switch-api/{api-switch.md → switch.md} +1 -1
- package/docs/{switch-api/api-app-guidelines.md → switch-appstore/app-guidelines.md} +41 -33
- package/docs/switch-appstore/app-manual.md +75 -0
- package/docs/switch-appstore/app-store-listing.md +60 -0
- package/docs/switch-appstore/app-store-submission.md +74 -0
- package/docs/{switch-api/api-logs-and-dataroot.md → switch-project/logs-and-dataroot.md} +1 -1
- package/docs/{switch-api/api-project-planning.md → switch-project/project-planning.md} +13 -13
- package/docs/switch-project/property-documentation.md +66 -0
- package/docs/{switch-api/api-property-editors.md → switch-project/property-editors.md} +10 -10
- package/docs/{switch-api/api-script-declaration.md → switch-project/script-declaration.md} +9 -9
- package/docs/{switch-api/api-script-structure.md → switch-project/script-structure.md} +5 -5
- package/docs/{switch-api/api-tooling.md → switch-project/tooling.md} +1 -1
- package/docs/switch-scripting.md +32 -27
- package/package.json +1 -1
- /package/docs/switch-api/{api-enums.md → enums.md} +0 -0
- /package/docs/switch-api/{api-http.md → http.md} +0 -0
- /package/docs/{switch-api/api-debugging.md → switch-project/debugging.md} +0 -0
- /package/docs/{switch-api/api-vscode.md → switch-project/vscode.md} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# App Publishing Guidelines
|
|
2
2
|
|
|
3
3
|
A pre-publish checklist for a script intended for the Enfocus Appstore (`ScriptPackageType="App"`
|
|
4
|
-
— see [
|
|
4
|
+
— see [script-structure.md § Script vs App](../switch-project/script-structure.md#script-vs-app)). Each item
|
|
5
5
|
here is enforced in more detail at the linked section — this page exists to be read top-to-bottom
|
|
6
6
|
right before submission, not as the primary source for any individual rule. The one exception is
|
|
7
7
|
[App-only](#app-only) at the bottom, which is documented in full here.
|
|
@@ -20,48 +20,49 @@ Items fall into three tiers, marked on each one:
|
|
|
20
20
|
|
|
21
21
|
- [ ] **Apps required / scripts recommended.** Every property name (`LocalizedTagName`) is 30
|
|
22
22
|
characters or fewer and uses sentence-style capitalization ("Customer name", not "Customer
|
|
23
|
-
Name") — see [
|
|
23
|
+
Name") — see [script-declaration.md](../switch-project/script-declaration.md#custom-property-elements-elementfields).
|
|
24
24
|
- [ ] **Apps required / scripts recommended.** Every property has a `Tooltip`, unless it's fully
|
|
25
25
|
self-explanatory with no extra constraints (e.g. "Number of copies" with no min/max) — see
|
|
26
|
-
[
|
|
26
|
+
[script-declaration.md](../switch-project/script-declaration.md#custom-property-elements-elementfields) for
|
|
27
|
+
the attribute and [property-documentation.md](../switch-project/property-documentation.md) for what to write in it.
|
|
27
28
|
- [ ] **Universal.** Dynamic editors (`sltextwithvar`/`mltextwithvar`, `conditionwithvar`,
|
|
28
29
|
`scriptexp`) are enabled wherever the value could plausibly vary per job, and omitted where the
|
|
29
30
|
value is inherently static (e.g. a dataset name) — see
|
|
30
|
-
[
|
|
31
|
+
[property-editors.md § Common practices](../switch-project/property-editors.md#common-practices).
|
|
31
32
|
- [ ] **Universal.** Keyword-style default values ("Default", "None", "Automatic", …) use the
|
|
32
33
|
matching literal editor (`default`, `none`, `automatic`, …), not a typed string default — see
|
|
33
|
-
[
|
|
34
|
+
[property-editors.md § Literal editors](../switch-project/property-editors.md#literal-editors).
|
|
34
35
|
- [ ] **Universal.** Every property using `askplugin`/`askplugin2` ("Select from library"/"Select
|
|
35
36
|
many from library") has a matching `getLibraryForProperty`/`getLibraryForConnectionProperty`
|
|
36
|
-
entry point — see [
|
|
37
|
+
entry point — see [entry-points.md § Property UI callbacks](../switch-api/entry-points.md#property-ui-callbacks).
|
|
37
38
|
- [ ] **Apps required / scripts recommended.** Every property's editor chain includes at least one
|
|
38
39
|
editor that doesn't require an add-on Switch module — e.g. never offer `scriptexp` (Scripting
|
|
39
40
|
Module) as the only editor — see
|
|
40
|
-
[
|
|
41
|
+
[property-editors.md § Common practices](../switch-project/property-editors.md#common-practices).
|
|
41
42
|
- [ ] **Universal.** Every property using the `external`/`external2`/… editor has either a
|
|
42
43
|
non-empty dependent `Application` property or a `findExternalEditorPath` entry point — see
|
|
43
|
-
[
|
|
44
|
+
[property-editors.md § Notes](../switch-project/property-editors.md#notes).
|
|
44
45
|
- [ ] **Apps required / scripts recommended.** Every property has a default value unless one
|
|
45
46
|
genuinely isn't possible, in which case the `Tooltip` gives an example value instead — see
|
|
46
|
-
[
|
|
47
|
+
[script-declaration.md](../switch-project/script-declaration.md#custom-property-elements-elementfields).
|
|
47
48
|
- [ ] **Universal.** Every property/connection field declaring `Validation="Custom"` or `"Standard
|
|
48
49
|
and custom"` has a matching `validateProperties`/`validateConnectionProperties` entry point —
|
|
49
|
-
see [
|
|
50
|
+
see [entry-points.md § Property UI callbacks](../switch-api/entry-points.md#property-ui-callbacks).
|
|
50
51
|
|
|
51
52
|
## Entry points
|
|
52
53
|
|
|
53
54
|
- [ ] **Universal.** `jobArrived` is present when `IncomingConnections="Yes"`; `timerFired` is
|
|
54
55
|
present when `IncomingConnections="No"` (and may additionally be present alongside `jobArrived`)
|
|
55
|
-
— see [
|
|
56
|
+
— see [entry-points.md § Job processing](../switch-api/entry-points.md#job-processing).
|
|
56
57
|
- [ ] **Universal.** No empty `jobArrived` or `timerFired` — an entry point that does nothing is
|
|
57
58
|
removed entirely, not left in place — see
|
|
58
|
-
[
|
|
59
|
+
[entry-points.md § Job processing](../switch-api/entry-points.md#job-processing).
|
|
59
60
|
|
|
60
61
|
## Sending jobs
|
|
61
62
|
|
|
62
63
|
All **universal** — see
|
|
63
|
-
[
|
|
64
|
-
[
|
|
64
|
+
[job-patterns.md § Sending jobs](../switch-api/job-patterns.md#sending-jobs) and
|
|
65
|
+
[script-declaration.md § ConnectionFields](../switch-project/script-declaration.md#connectionfields) for full
|
|
65
66
|
detail.
|
|
66
67
|
|
|
67
68
|
- [ ] If `OutgoingConnections` is not `No`, some `sendTo*()` method is called at least once for
|
|
@@ -83,27 +84,27 @@ detail.
|
|
|
83
84
|
- [ ] **Universal.** An `Error` is logged when a custom
|
|
84
85
|
`validateProperties`/`validateConnectionProperties` check returns `valid: false` for a tag, and
|
|
85
86
|
when `getLibraryForProperty`/`getLibraryForConnectionProperty` would otherwise return an empty
|
|
86
|
-
list — see [
|
|
87
|
+
list — see [logging.md § Message quality](../switch-api/logging.md#message-quality).
|
|
87
88
|
- [ ] **Universal.** Log messages are free of grammatical errors and typos — see
|
|
88
|
-
[
|
|
89
|
+
[logging.md § Message quality](../switch-api/logging.md#message-quality).
|
|
89
90
|
- [ ] **Universal.** Log messages use `%1`/`%2`/… placeholders with `messageParams`, not string
|
|
90
91
|
concatenation or interpolation of dynamic values — required for correct translation. See
|
|
91
|
-
[
|
|
92
|
+
[logging.md § Placeholders instead of concatenation](../switch-api/logging.md#placeholders-instead-of-concatenation),
|
|
92
93
|
which also covers the separate, narrower literal-`%` escaping gotcha.
|
|
93
94
|
- [ ] **Apps required / scripts recommended.** Logging isn't excessive — no `Info`/`Debug` calls
|
|
94
95
|
that don't help a flow operator or support engineer understand what happened — see
|
|
95
|
-
[
|
|
96
|
+
[logging.md § Log volume](../switch-api/logging.md#log-volume).
|
|
96
97
|
|
|
97
98
|
## Temp files and paths
|
|
98
99
|
|
|
99
100
|
- [ ] **Universal.** All temporary files and folders are removed by the script before it finishes,
|
|
100
101
|
rather than relying on Switch's executor-refresh cleanup — see
|
|
101
|
-
[
|
|
102
|
+
[job-patterns.md § Temp file cleanup](../switch-api/job-patterns.md#temp-file-cleanup).
|
|
102
103
|
- [ ] **Universal.** No Oracle JRE is embedded as an extra file, in a script or an app — see
|
|
103
|
-
[
|
|
104
|
+
[script-structure.md § Script folder files](../switch-project/script-structure.md#script-folder-files).
|
|
104
105
|
- [ ] **Apps required / scripts recommended.** File system path strings are built with Node's
|
|
105
106
|
`path` module, not hardcoded separators or string concatenation — see
|
|
106
|
-
[
|
|
107
|
+
[job-patterns.md § Platform-independent paths](../switch-api/job-patterns.md#platform-independent-paths).
|
|
107
108
|
|
|
108
109
|
---
|
|
109
110
|
|
|
@@ -141,7 +142,7 @@ Unlike the sections above, these are documented in full here rather than deferri
|
|
|
141
142
|
- [ ] **`ExecutionMode="Concurrent"` wherever the script allows it.** `Serialized` is the default
|
|
142
143
|
and the slower choice; concurrent is preferred for throughput. If you go concurrent, the script
|
|
143
144
|
must synchronise its own access to any shared resource — see
|
|
144
|
-
[
|
|
145
|
+
[execution-environment.md § Execution modes](../switch-api/execution-environment.md#execution-modes).
|
|
145
146
|
- [ ] **`ExecutionGroup` is shared across every app that drives the same non-concurrent third-party
|
|
146
147
|
application**, so Switch can stop them using it simultaneously. If your app is in that situation,
|
|
147
148
|
ask Enfocus which group name to use rather than inventing one.
|
|
@@ -153,11 +154,16 @@ Unlike the sections above, these are documented in full here rather than deferri
|
|
|
153
154
|
what it declares — the declared subcategory only takes effect once Enfocus has signed the app, and
|
|
154
155
|
review may change it.
|
|
155
156
|
- [ ] **`DetailedInfo` is present on every property and every connection**, not just `Tooltip`.
|
|
156
|
-
Switch Designer
|
|
157
|
-
produces a blank entry
|
|
157
|
+
Switch Designer can export a *flow's* HTML documentation from every element in it, so an empty
|
|
158
|
+
`DetailedInfo` produces a blank entry there if a flow builder ever generates one — see
|
|
159
|
+
[property-documentation.md](../switch-project/property-documentation.md) for what to write in it, and when
|
|
160
|
+
it's fine to leave blank.
|
|
158
161
|
- [ ] **`Description`, `Compatibility`, `SupportInfo` and `AppDiscovery` are filled in.** These are
|
|
159
162
|
required to create the `.enfpack` at all, and `SupportInfo` must point at *your* support channel,
|
|
160
|
-
never Enfocus Support.
|
|
163
|
+
never Enfocus Support — see [app-store-listing.md](app-store-listing.md) for what to write
|
|
164
|
+
in each.
|
|
165
|
+
- [ ] **The app manual document is prepared**, following Enfocus's `documentation-app_name.docx`
|
|
166
|
+
template, and uploaded during Appstore review — see [app-manual.md](app-manual.md).
|
|
161
167
|
- [ ] **The declared incoming/outgoing connection topology matches what the code actually does** —
|
|
162
168
|
see [Entry points](#entry-points) and [Sending jobs](#sending-jobs) above.
|
|
163
169
|
- [ ] **Dependent properties have real dependency conditions and values, never left empty**, and the
|
|
@@ -179,8 +185,8 @@ Unlike the sections above, these are documented in full here rather than deferri
|
|
|
179
185
|
### Localization
|
|
180
186
|
|
|
181
187
|
- [ ] **Prefer more than one language.** An app is preferably localized beyond English — see
|
|
182
|
-
[Translation files](
|
|
183
|
-
`SwitchScriptTool --generate-translations` in [
|
|
188
|
+
[Translation files](../switch-project/script-structure.md#script-folder-files) (`<LanguageCode>.ts`) and
|
|
189
|
+
`SwitchScriptTool --generate-translations` in [tooling.md](../switch-project/tooling.md).
|
|
184
190
|
- [ ] **The app's own translations are limited to the six Switch UI languages** (English, French,
|
|
185
191
|
German, Italian, Chinese, Japanese); other languages are not accepted for the app itself. The
|
|
186
192
|
separate Appstore *documentation* may be supplied in additional languages, since it isn't
|
|
@@ -190,15 +196,17 @@ Unlike the sections above, these are documented in full here rather than deferri
|
|
|
190
196
|
user-facing message needs an entry in each shipped language file, and log calls must go through
|
|
191
197
|
that mechanism rather than hardcoding English text that bypasses it. Note that
|
|
192
198
|
`Switch.tr()` extraction is static and silently skips anything that isn't a plain string literal
|
|
193
|
-
— see [
|
|
199
|
+
— see [switch.md § Translation extraction rules](../switch-api/switch.md#translation-extraction-rules).
|
|
194
200
|
Check the generated `.ts` files rather than assuming.
|
|
195
201
|
|
|
196
202
|
### Icon
|
|
197
203
|
|
|
198
204
|
- [ ] **32×32 PNG, RGB, transparent background**, attached as the app icon. This is what appears in
|
|
199
205
|
the Elements pane and in flows.
|
|
200
|
-
- [ ] **A separate 200×200
|
|
201
|
-
part of the pack.
|
|
206
|
+
- [ ] **A separate icon (at least 200×200, square) is uploaded to the Appstore submission form**
|
|
207
|
+
for the Appstore listing — it is not part of the pack. See
|
|
208
|
+
[app-store-submission.md § Icons](app-store-submission.md#icons) for both assets' exact
|
|
209
|
+
specs and how to derive/verify them from source art.
|
|
202
210
|
|
|
203
211
|
### Extra files
|
|
204
212
|
|
|
@@ -214,9 +222,9 @@ Unlike the sections above, these are documented in full here rather than deferri
|
|
|
214
222
|
validates the app package's signature, and content that changes after signing fails that
|
|
215
223
|
validation, causing Switch to remove the app. Write runtime-mutable data (temp files, caches,
|
|
216
224
|
generated output) outside the app folder — see
|
|
217
|
-
[
|
|
225
|
+
[job-patterns.md § Temp file cleanup](../switch-api/job-patterns.md#temp-file-cleanup).
|
|
218
226
|
- [ ] Find bundled files at runtime with `flowElement.getPluginResourcesPath()` — see
|
|
219
|
-
[
|
|
227
|
+
[flow-element.md](../switch-api/flow-element.md).
|
|
220
228
|
|
|
221
229
|
### Source and review hygiene
|
|
222
230
|
|
|
@@ -224,7 +232,7 @@ Unlike the sections above, these are documented in full here rather than deferri
|
|
|
224
232
|
- [ ] **No malicious or unrelated payload** — nothing that harms the user's machine or installs
|
|
225
233
|
additional software.
|
|
226
234
|
- [ ] **No Oracle JRE embedded**, in a script or an app, for licensing reasons — see
|
|
227
|
-
[
|
|
235
|
+
[script-structure.md § Script folder files](../switch-project/script-structure.md#script-folder-files).
|
|
228
236
|
- [ ] **Automating a third-party application doesn't breach that application's licence.** Some
|
|
229
237
|
vendors' terms explicitly exclude automation; check before building.
|
|
230
238
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Writing the App Manual
|
|
2
|
+
|
|
3
|
+
Guidance for the separate Word/PDF document an app creator uploads during Appstore review,
|
|
4
|
+
following Enfocus's `documentation-app_name.docx` template. Enfocus shows it as a downloadable
|
|
5
|
+
document on the app's Appstore detail page — distinct from the
|
|
6
|
+
[listing fields](app-store-listing.md) shown inline on the listing itself, and from
|
|
7
|
+
[Tooltip/DetailedInfo](../switch-project/property-documentation.md), seen only after installing. Follow the
|
|
8
|
+
template's section order below; don't invent your own structure.
|
|
9
|
+
|
|
10
|
+
**Delivery:** there's no declaration attribute for this content, since it isn't part of the app
|
|
11
|
+
itself. Write it to `./DOCUMENTATION.md` at the project root, using the section headers below. The
|
|
12
|
+
user copies each section into Enfocus's `documentation-app_name.docx` template and uploads the
|
|
13
|
+
result during Appstore review; tell them that's the next step once the file is written.
|
|
14
|
+
|
|
15
|
+
Same writing-quality bar as [property-documentation.md § Writing quality](../switch-project/property-documentation.md#writing-quality):
|
|
16
|
+
no restated field names, no generic marketing vocabulary, no meta-commentary about the
|
|
17
|
+
implementation, no vague filler, no copy-pasted boilerplate, nothing that won't translate cleanly.
|
|
18
|
+
|
|
19
|
+
## App name
|
|
20
|
+
|
|
21
|
+
The declaration's `DisplayName`.
|
|
22
|
+
|
|
23
|
+
## Description
|
|
24
|
+
|
|
25
|
+
Reuse [the listing's `Description`](app-store-listing.md#description) — adapt lightly if the
|
|
26
|
+
extra room here helps (e.g. a screenshot the listing field can't carry), but don't rewrite the
|
|
27
|
+
same facts from scratch.
|
|
28
|
+
|
|
29
|
+
## Compatibility
|
|
30
|
+
|
|
31
|
+
**Not the same field as the declaration's `Compatibility` attribute** — see the naming trap in
|
|
32
|
+
[app-store-listing.md § Compatibility](app-store-listing.md#compatibility). This section
|
|
33
|
+
is the minimum **Switch** version the app requires, e.g. "Switch 24.10 and higher." There's no
|
|
34
|
+
declaration attribute for it; it's implicit in which SwitchScripter version built the app (see
|
|
35
|
+
[script-structure.md § SwitchScripter and Switch version compatibility](../switch-project/script-structure.md#switchscripter-and-switch-version-compatibility)).
|
|
36
|
+
The same value also goes in the "Switch Version" field on the
|
|
37
|
+
[Appstore App Version submission form](app-store-submission.md#fields-that-reuse-content-youve-already-written)
|
|
38
|
+
— state it explicitly here rather than leaving it for the reader to infer.
|
|
39
|
+
|
|
40
|
+
## Compatibility third-party applications
|
|
41
|
+
|
|
42
|
+
Reuse [the listing's `Compatibility`](app-store-listing.md#compatibility) content — the
|
|
43
|
+
third-party application versions this app supports, with links to the vendor's download/version
|
|
44
|
+
page where one exists.
|
|
45
|
+
|
|
46
|
+
## Application discovery details
|
|
47
|
+
|
|
48
|
+
Reuse [the listing's `AppDiscovery`](app-store-listing.md#appdiscovery) content. Add a
|
|
49
|
+
screenshot here if the discovery mechanism (or the manual-path property, when auto-detection
|
|
50
|
+
fails) is easier to show than describe.
|
|
51
|
+
|
|
52
|
+
## Connections
|
|
53
|
+
|
|
54
|
+
Reuse [the listing's `Connections`](app-store-listing.md#connections) content, expanded with
|
|
55
|
+
whatever detail or screenshots the shorter listing field couldn't carry.
|
|
56
|
+
|
|
57
|
+
## Properties detailed info
|
|
58
|
+
|
|
59
|
+
Reuse each property's and connection's [`DetailedInfo`](../switch-project/property-documentation.md#detailedinfo)
|
|
60
|
+
content — but don't limit this section to whatever `DetailedInfo` happens to contain. `DetailedInfo`
|
|
61
|
+
is optional and often left blank; this manual is the far more likely surface to actually be read,
|
|
62
|
+
so write real per-property content here even for properties where `DetailedInfo` was skipped.
|
|
63
|
+
|
|
64
|
+
For an app bundle (multiple flow elements in one pack), document each flow element separately —
|
|
65
|
+
the template repeats this section per element ("Flow element 1", "Flow element 2", …).
|
|
66
|
+
|
|
67
|
+
### Flow elements properties
|
|
68
|
+
|
|
69
|
+
Per flow element, per property: what it controls, and any tip or constraint a user needs to get
|
|
70
|
+
the element working — the same content `DetailedInfo` would hold, written in full regardless of
|
|
71
|
+
whether `DetailedInfo` itself was filled in.
|
|
72
|
+
|
|
73
|
+
### Outgoing connections properties
|
|
74
|
+
|
|
75
|
+
Same treatment, for injected connection properties.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Writing the Appstore Listing Fields
|
|
2
|
+
|
|
3
|
+
Guidance for the *content* of the declaration's prose fields that appear on the app's Enfocus
|
|
4
|
+
Appstore listing: `Description`, `Compatibility`, `SupportInfo`, `AppDiscovery`, and `Connections`
|
|
5
|
+
— see [script-declaration.md](../switch-project/script-declaration.md#built-in-elementfields) for the
|
|
6
|
+
attribute mechanics.
|
|
7
|
+
|
|
8
|
+
Audience here is a prospective buyer browsing the Appstore, deciding whether to install the app at
|
|
9
|
+
all — they haven't seen the flow element yet. That's different from
|
|
10
|
+
[property-documentation.md](../switch-project/property-documentation.md) (`Tooltip`/`DetailedInfo`, read only
|
|
11
|
+
after installing) and from [app-manual.md](app-manual.md) (a separate uploaded document).
|
|
12
|
+
This content is also reused directly in the app manual's Description, Compatibility third-party
|
|
13
|
+
applications, Application discovery details, and Connections sections — write it once, here, well.
|
|
14
|
+
|
|
15
|
+
**Delivery:** write this content directly into the matching top-level attributes in
|
|
16
|
+
`<ScriptID>.xml` (`Description`, `Compatibility`, `SupportInfo`, `AppDiscovery`, `Connections`) —
|
|
17
|
+
there is no separate file. See
|
|
18
|
+
[script-declaration.md § Agent editing policy](../switch-project/script-declaration.md#agent-editing-policy)
|
|
19
|
+
for how to edit the declaration safely.
|
|
20
|
+
|
|
21
|
+
Same writing-quality bar as [property-documentation.md § Writing quality](../switch-project/property-documentation.md#writing-quality):
|
|
22
|
+
no restated field names, no generic marketing vocabulary, no meta-commentary about the
|
|
23
|
+
implementation, no vague filler, no copy-pasted boilerplate, nothing that won't translate cleanly.
|
|
24
|
+
|
|
25
|
+
## `Description`
|
|
26
|
+
|
|
27
|
+
What the app does, who it's for, and the third-party application or service it automates. Lead
|
|
28
|
+
with the concrete task the app performs, not a category label — "Converts incoming PDFs to the
|
|
29
|
+
customer's house color profile using ColorLogic" tells a buyer more than "A color management
|
|
30
|
+
app." A screenshot is worth adding here if it clarifies the app's purpose faster than prose would.
|
|
31
|
+
|
|
32
|
+
## `Compatibility`
|
|
33
|
+
|
|
34
|
+
**Naming trap:** despite the name, this is **third-party application** compatibility, not Switch
|
|
35
|
+
version compatibility — Switch has no declaration field for the minimum Switch version an app
|
|
36
|
+
requires (see [app-manual.md § Compatibility](app-manual.md#compatibility) for where that
|
|
37
|
+
goes instead). State which versions of the automated third-party application are supported, e.g.
|
|
38
|
+
"Requires Acrobat Pro DC 2023 or later." Link to the third-party vendor's own download or version
|
|
39
|
+
page if one exists.
|
|
40
|
+
|
|
41
|
+
## `SupportInfo`
|
|
42
|
+
|
|
43
|
+
The app creator's own support channel (email or URL) — **never Enfocus Support**, this is
|
|
44
|
+
mandatory per [app-guidelines.md § App-only](app-guidelines.md#top-level-declaration-properties).
|
|
45
|
+
State the channel plainly; this field has no dedicated section in the app manual, so it's the only
|
|
46
|
+
place this information reliably reaches a buyer before they install.
|
|
47
|
+
|
|
48
|
+
## `AppDiscovery`
|
|
49
|
+
|
|
50
|
+
How the app locates the third-party application on disk. State the actual mechanism, concretely
|
|
51
|
+
enough that a user who hits a failure knows what to check: which known install paths are searched
|
|
52
|
+
first, and — if auto-detection can fail — which property lets the user point at the install
|
|
53
|
+
location manually.
|
|
54
|
+
|
|
55
|
+
## `Connections`
|
|
56
|
+
|
|
57
|
+
A prose overview of the flow element's incoming and outgoing connections: what triggers the
|
|
58
|
+
element, what each outgoing connection carries, and when a job is routed to which one. This is the
|
|
59
|
+
topology summary a flow builder reads before wiring the element into a flow, so describe behavior
|
|
60
|
+
("routes to Error when validation fails"), not just connection names.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Writing the Appstore Submission Forms
|
|
2
|
+
|
|
3
|
+
Guidance for the two web forms on the Enfocus Appstore site: **Create Appstore App** (once per
|
|
4
|
+
app) and **Create Appstore App Version** (once per release). These are separate from the
|
|
5
|
+
[listing fields](app-store-listing.md) in the declaration and from the
|
|
6
|
+
[app manual](app-manual.md) — a human fills these forms in directly on the Enfocus website, so
|
|
7
|
+
the agent's job is to prepare the content, not submit it. `Package Password`, `Binary`, and
|
|
8
|
+
`Signed Binary` are manual/security-sensitive steps on the App Version form; leave those to the
|
|
9
|
+
user entirely.
|
|
10
|
+
|
|
11
|
+
**Delivery:** write the content below to `./README.md` at the project root, labeled by field name,
|
|
12
|
+
for the user to copy into the two forms. If the project already has a `README.md` for other
|
|
13
|
+
purposes, add a clearly separated section rather than overwriting it.
|
|
14
|
+
|
|
15
|
+
Same writing-quality bar as [property-documentation.md § Writing quality](../switch-project/property-documentation.md#writing-quality).
|
|
16
|
+
|
|
17
|
+
## Fields that reuse content you've already written
|
|
18
|
+
|
|
19
|
+
Point the user at the source instead of rewriting these:
|
|
20
|
+
|
|
21
|
+
| Form field | Source |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Display Name | Declaration `DisplayName` |
|
|
24
|
+
| Internal Identifier | Declaration `Name` |
|
|
25
|
+
| Long Description | [Listing `Description`](app-store-listing.md#description) |
|
|
26
|
+
| Keywords | Declaration `Keywords` — the form must match it exactly, it's checked against the script source |
|
|
27
|
+
| Categories | Declaration `PositionInElementPane`/`SubcategoryInElementPane` — see [app-guidelines.md](app-guidelines.md#top-level-declaration-properties) |
|
|
28
|
+
| Support Website / Support Phone / Support Email | [Listing `SupportInfo`](app-store-listing.md#supportinfo), split across the three fields the form actually has |
|
|
29
|
+
| Third-party Compatibility | [Listing `Compatibility`](app-store-listing.md#compatibility) |
|
|
30
|
+
| Switch Version | The minimum Switch version, same content as [the app manual's Compatibility section](app-manual.md#compatibility) |
|
|
31
|
+
|
|
32
|
+
## New content
|
|
33
|
+
|
|
34
|
+
Nothing above covers these — the form is the only place they're written.
|
|
35
|
+
|
|
36
|
+
### Short Description
|
|
37
|
+
|
|
38
|
+
Max 500 characters. Distinct from Long Description: this is the search-result and marketing-email
|
|
39
|
+
summary, not a shorter copy of the full description. One or two sentences stating what the app
|
|
40
|
+
does and the third-party dependency, without repeating Display Name.
|
|
41
|
+
|
|
42
|
+
### What's new
|
|
43
|
+
|
|
44
|
+
Per-version release notes: what changed in *this* version, for someone deciding whether to update.
|
|
45
|
+
Lead with the effect on the user (new capability, fixed behavior), not the implementation. Skip
|
|
46
|
+
internal refactors with no user-visible effect.
|
|
47
|
+
|
|
48
|
+
### Eula
|
|
49
|
+
|
|
50
|
+
**Don't draft this from scratch.** A EULA is a binding legal document — write it only from the app
|
|
51
|
+
creator's existing legal-reviewed template, or leave it for them to supply. If neither exists, tell
|
|
52
|
+
the user this needs their own legal review rather than generating terms.
|
|
53
|
+
|
|
54
|
+
## Icons
|
|
55
|
+
|
|
56
|
+
Two separate image assets, both uploaded on the Create Appstore App form:
|
|
57
|
+
|
|
58
|
+
| Field | Spec | Notes |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| Switch Icon | 32×32 px recommended (larger is resized down); PNG/GIF/JPG | Must match the `Icon` property already in the script source — use the same file you packaged with the app, don't create a second one |
|
|
61
|
+
| Appstore Icon | At least 200×200 px, square (a non-square image gets transparent padding added); PNG/GIF/JPG, under 100 MB | Used across the whole Appstore site: overview, detail page, search results |
|
|
62
|
+
|
|
63
|
+
Creating the actual artwork is a design task, not something to improvise without source material —
|
|
64
|
+
if the app creator hasn't supplied a logo or icon source image, say so rather than generating
|
|
65
|
+
placeholder art. Given a source image, verify and derive the two required files with a CLI image
|
|
66
|
+
tool (`sips` on macOS, or ImageMagick):
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Verify dimensions and that the file is actually PNG
|
|
70
|
+
sips -g pixelWidth -g pixelHeight -g format icon-source.png
|
|
71
|
+
|
|
72
|
+
# Resize down to the 32x32 Switch icon (never upscale a smaller source)
|
|
73
|
+
sips -z 32 32 icon-source.png --out switch-icon.png
|
|
74
|
+
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
For diagnosing or validating a script from the outside — reading what the user themselves would see
|
|
4
4
|
in Switch's Message pane — rather than instrumenting the script itself. See
|
|
5
|
-
[
|
|
5
|
+
[logging.md](../switch-api/logging.md) for how a script produces these messages in the first place.
|
|
6
6
|
|
|
7
7
|
## Finding the Application Data Root
|
|
8
8
|
|
|
@@ -16,19 +16,19 @@ relevant.
|
|
|
16
16
|
|
|
17
17
|
Ask whether this is for private or internal use (a plain `Script`, distributed freely) or intended
|
|
18
18
|
for the Enfocus Appstore (an `App`). See
|
|
19
|
-
[
|
|
19
|
+
[script-structure.md § Script vs App](script-structure.md#script-vs-app) for what differs.
|
|
20
20
|
|
|
21
21
|
This answer gates several items below:
|
|
22
22
|
|
|
23
23
|
- **App**: localization, password protection, `Name`-never-changes discipline, `Concurrent`-by-default
|
|
24
24
|
expectation, icon/keywords, and the version-baseline and Appstore-competition checks further down
|
|
25
|
-
all apply. See [
|
|
25
|
+
all apply. See [app-guidelines.md](../switch-appstore/app-guidelines.md) for the full pre-publish checklist,
|
|
26
26
|
most of which is worth designing toward from the start rather than retrofitting later.
|
|
27
27
|
- **Script**: none of the app-only items apply. Keep it simple and don't raise app concerns for a
|
|
28
28
|
plain script.
|
|
29
29
|
|
|
30
30
|
If App, also ask which languages it must support. English is required; more than one language is
|
|
31
|
-
preferable, see [
|
|
31
|
+
preferable, see [app-guidelines.md § Localization](../switch-appstore/app-guidelines.md#localization).
|
|
32
32
|
|
|
33
33
|
### 2. What should job processing look like in their flow?
|
|
34
34
|
|
|
@@ -37,15 +37,15 @@ need to wait on an external process or resource, could more than one job at a ti
|
|
|
37
37
|
shared resource. Don't ask the user to pick entry points or connection types directly. Translate the
|
|
38
38
|
answer into a concrete proposal (which entry points, which `sendTo*()` methods, whether `jobArrived`
|
|
39
39
|
alone is enough or work must be deferred to `timerFired`) using
|
|
40
|
-
[
|
|
41
|
-
[
|
|
40
|
+
[entry-points.md](../switch-api/entry-points.md) and
|
|
41
|
+
[job-patterns.md § Sending jobs](../switch-api/job-patterns.md#sending-jobs), and be upfront about
|
|
42
42
|
limitations and tradeoffs so the user can make an informed choice, rather than silently picking an
|
|
43
43
|
approach.
|
|
44
44
|
|
|
45
45
|
If the design defers job processing to `timerFired` via global data, say explicitly that a flow
|
|
46
46
|
restart replays every queued job through `jobArrived` again, and the script must recognize and skip
|
|
47
47
|
an already-registered job quickly, or a large backlog is slow to clear, see
|
|
48
|
-
[
|
|
48
|
+
[entry-points.md § Job processing](../switch-api/entry-points.md#job-processing).
|
|
49
49
|
|
|
50
50
|
## Evaluate and flag, don't ask upfront
|
|
51
51
|
|
|
@@ -53,7 +53,7 @@ an already-registered job quickly, or a large backlog is slow to clear, see
|
|
|
53
53
|
|
|
54
54
|
Switch Server runs on Windows and macOS. Default to writing platform-independent code (the `path`
|
|
55
55
|
module, no hardcoded separators, see
|
|
56
|
-
[
|
|
56
|
+
[job-patterns.md § Platform-independent paths](../switch-api/job-patterns.md#platform-independent-paths))
|
|
57
57
|
without asking. Only raise target OS as an explicit question once the script needs OS-specific code,
|
|
58
58
|
bundles a native binary, or ships a platform-specific package build, since only then does the answer
|
|
59
59
|
change anything.
|
|
@@ -62,28 +62,28 @@ change anything.
|
|
|
62
62
|
|
|
63
63
|
Once Script vs App is answered as App, ask or infer the oldest Switch version the app must support.
|
|
64
64
|
This sets the Node.js baseline (see
|
|
65
|
-
[
|
|
65
|
+
[script-structure.md § Node.js version per Switch version](script-structure.md#nodejs-version-per-switch-version))
|
|
66
66
|
and which SwitchScripter build is needed to produce a compatible `.enfpack`. Don't ask this for a
|
|
67
67
|
plain script.
|
|
68
68
|
|
|
69
69
|
### Concurrency
|
|
70
70
|
|
|
71
71
|
Default to `Concurrent` execution; it's the preferred choice for apps per
|
|
72
|
-
[
|
|
72
|
+
[app-guidelines.md § Top-level declaration properties](../switch-appstore/app-guidelines.md#top-level-declaration-properties).
|
|
73
73
|
Don't ask the user to choose upfront. Only raise `Serialized`, and explain why, when the design has
|
|
74
74
|
an actual reason to need it: a third-party application or shared resource that can't tolerate
|
|
75
75
|
concurrent access, or an API the script drives that isn't safe to call in parallel. See
|
|
76
|
-
[
|
|
76
|
+
[execution-environment.md § Execution modes](../switch-api/execution-environment.md#execution-modes).
|
|
77
77
|
|
|
78
78
|
### Native or binary npm dependencies
|
|
79
79
|
|
|
80
80
|
A file-based script or app that ends up on the ESM bundling path cannot use native (binary) Node
|
|
81
81
|
addons at all, see
|
|
82
|
-
[
|
|
82
|
+
[execution-environment.md § Native (binary) addons are not supported](../switch-api/execution-environment.md#native-binary-addons-are-not-supported).
|
|
83
83
|
If a planned dependency needs one, for example `sharp` or native `sqlite3` bindings, say so before
|
|
84
84
|
the user commits to that library, and suggest a pure JavaScript alternative or a workaround, such as
|
|
85
85
|
shelling out to an external binary, see
|
|
86
|
-
[
|
|
86
|
+
[job-patterns.md § Driving a third-party CLI application](../switch-api/job-patterns.md#driving-a-third-party-cli-application),
|
|
87
87
|
where one exists.
|
|
88
88
|
|
|
89
89
|
### Appstore competition risk (apps only)
|
|
@@ -97,4 +97,4 @@ the relevant module license or contacting Enfocus to check before proceeding.
|
|
|
97
97
|
---
|
|
98
98
|
|
|
99
99
|
This checklist stops at planning. Once these are answered, move to
|
|
100
|
-
[
|
|
100
|
+
[script-structure.md](script-structure.md) to scaffold the project.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Writing Property and Connection Documentation
|
|
2
|
+
|
|
3
|
+
Guidance for the *content* of `Tooltip` and `DetailedInfo` on properties and connections — see
|
|
4
|
+
[script-declaration.md](script-declaration.md#custom-property-elements-elementfields) for
|
|
5
|
+
the attribute mechanics (when each is required, what breaks if omitted). This page covers what to
|
|
6
|
+
actually write in them.
|
|
7
|
+
|
|
8
|
+
Both attributes are read only inside Switch Designer, by someone who has already added the flow
|
|
9
|
+
element to a flow. Compare with [app-store-listing.md](../switch-appstore/app-store-listing.md), read by
|
|
10
|
+
someone deciding whether to install the app at all, and [app-manual.md](../switch-appstore/app-manual.md), a
|
|
11
|
+
separate uploaded document.
|
|
12
|
+
|
|
13
|
+
**Delivery:** write this content directly into the `Tooltip`/`DetailedInfo` attributes in
|
|
14
|
+
`<ScriptID>.xml` — there is no separate file. See
|
|
15
|
+
[script-declaration.md § Agent editing policy](script-declaration.md#agent-editing-policy)
|
|
16
|
+
for how to edit the declaration safely.
|
|
17
|
+
|
|
18
|
+
## Tooltip
|
|
19
|
+
|
|
20
|
+
The one-line hint shown in the Properties pane. This is the field that matters most here — it's
|
|
21
|
+
always visible to whoever is configuring the property, connection, or the app's own icon, with no
|
|
22
|
+
extra click required.
|
|
23
|
+
|
|
24
|
+
- Add information the property name doesn't already give: units, valid range, format, or an
|
|
25
|
+
example value. A tooltip that just restates the label ("Output folder: the output folder to
|
|
26
|
+
use") wastes the one line a user reliably reads.
|
|
27
|
+
- If no sensible default is possible, put an example value in the tooltip — see the `Default`
|
|
28
|
+
guideline in [script-declaration.md](script-declaration.md#custom-property-elements-elementfields).
|
|
29
|
+
- Sentence-style capitalization, no trailing period, one line. Match the style already used in
|
|
30
|
+
declarations: `Tooltip="Select the output folder"`.
|
|
31
|
+
- Skip it only when the property is genuinely self-explanatory from its name alone, with no
|
|
32
|
+
constraints worth stating (e.g. "Number of copies" with no min/max).
|
|
33
|
+
|
|
34
|
+
## DetailedInfo
|
|
35
|
+
|
|
36
|
+
Feeds the HTML documentation Switch Designer can export for a whole *flow* — not something
|
|
37
|
+
specific to this app, it's compiled from every element the flow builder happens to have placed in
|
|
38
|
+
that flow. Real, but low priority in practice: it's an opt-in export most flow builders never
|
|
39
|
+
generate, and plenty of shipped apps leave it blank. Don't treat an empty `DetailedInfo` as a
|
|
40
|
+
defect to pad out.
|
|
41
|
+
|
|
42
|
+
Fill it in when the tooltip's one line genuinely isn't enough — an interaction with another
|
|
43
|
+
property, an edge case worth flagging, or why a setting matters, not a restatement of the tooltip
|
|
44
|
+
in longer sentences. A trivial property with `DetailedInfo=""` is expected and fine.
|
|
45
|
+
|
|
46
|
+
If you do write `DetailedInfo`, don't rely on it being the only place that content exists — the
|
|
47
|
+
property's fuller description belongs in [app-manual.md](../switch-appstore/app-manual.md#properties-detailed-info)
|
|
48
|
+
regardless, since that document is far more likely to actually be read.
|
|
49
|
+
|
|
50
|
+
## Writing quality
|
|
51
|
+
|
|
52
|
+
Applies to both fields, and is the same bar [app-store-listing.md](../switch-appstore/app-store-listing.md)
|
|
53
|
+
and [app-manual.md](../switch-appstore/app-manual.md) hold their content to:
|
|
54
|
+
|
|
55
|
+
- **Don't restate the field name.** A tooltip on "Output folder" that says "The output folder"
|
|
56
|
+
adds nothing a user didn't already know.
|
|
57
|
+
- **No generic AI/marketing vocabulary** — powerful, seamless, robust, intuitive, and similar
|
|
58
|
+
words that could describe any property in any app. Say the specific thing this one does.
|
|
59
|
+
- **No meta-commentary about the implementation.** Write what the user sees or does, not how the
|
|
60
|
+
script is coded internally ("this property is passed to the internal handler").
|
|
61
|
+
- **No vague filler.** "Set this to an appropriate value" tells a user nothing; a concrete unit,
|
|
62
|
+
range, or example does.
|
|
63
|
+
- **No copy-pasted boilerplate across properties.** Identical tooltip text reused on unrelated
|
|
64
|
+
properties signals nobody thought about the individual property.
|
|
65
|
+
- **Keep it translatable.** Idioms and culture-specific references don't translate cleanly into
|
|
66
|
+
the six Switch languages — see [switch.md § Translation extraction rules](../switch-api/switch.md#translation-extraction-rules).
|