@synopackageland/templates 0.10.8 → 0.10.10
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/README.md +2 -2
- package/package.json +1 -1
- package/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +1 -1
- package/templates/native-go/backend/go.mod +1 -1
- package/templates/native-go/backend/go.sum +2 -2
- package/templates/native-go-root-ops/frontend/src/ExecutorGate.vue +6 -3
- package/templates/native-go-root-ops/frontend/test/executor-gate.test.ts +12 -0
- package/templates/native-go-vue/README.md +4 -1
- package/templates/native-go-vue/frontend/package-lock.json +4 -4
- package/templates/native-go-vue/frontend/package.json +1 -1
- package/templates/native-node/dsm-package.yaml +1 -1
- package/templates/native-python/dsm-package.yaml +1 -1
- package/templates/native-rust/backend/Cargo.lock +2 -2
- package/templates/native-rust/backend/Cargo.toml +1 -1
package/README.md
CHANGED
|
@@ -38,11 +38,11 @@ calls each one from the generated script of the same name (`synopkgland skill sh
|
|
|
38
38
|
The placeholders `__PACKAGE__` (also the Go module path), `__DISPLAY_NAME__` and
|
|
39
39
|
`__BACKGROUND_ENABLED__` are substituted by `init`.
|
|
40
40
|
|
|
41
|
-
`backend/go.mod` requires `github.com/synopackageland/syno-pkg-land-sdk v0.10.
|
|
41
|
+
`backend/go.mod` requires `github.com/synopackageland/syno-pkg-land-sdk v0.10.9`; that line is
|
|
42
42
|
the single source of the SDK version and `frontend/package.json` pins
|
|
43
43
|
`@synopackageland/sdk` to the same version. Python and Node.js name it in
|
|
44
44
|
`backend.sdk`, Rust in the `syno-pkg-land-app` tag of `backend/Cargo.toml`
|
|
45
|
-
(and `Cargo.lock`); all of them pin 0.10.
|
|
45
|
+
(and `Cargo.lock`); all of them pin 0.10.9. The Vue frontend pins
|
|
46
46
|
`@synopackageland/ui` 0.9.8.
|
|
47
47
|
|
|
48
48
|
## Notice writer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/templates",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.10",
|
|
4
4
|
"description": "Project templates for synopkgland init: native-go, native-python, native-node and native-rust (plain or Vue, with jobs, delegate and root-ops overlays), binary and compose.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {"type": "git", "url": "git+https://github.com/synopackageland/syno-pkg-land-templates.git"},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
github.com/synopackageland/syno-pkg-land-sdk v0.10.
|
|
2
|
-
github.com/synopackageland/syno-pkg-land-sdk v0.10.
|
|
1
|
+
github.com/synopackageland/syno-pkg-land-sdk v0.10.9 h1:QuRK6UbSrbfotMxfpJG62xEzZq0cQVy6VSFb9HpdoQk=
|
|
2
|
+
github.com/synopackageland/syno-pkg-land-sdk v0.10.9/go.mod h1:hlsvaVuH2wsAoR8jzI1Rg/NeejQSFpAaN6zpIWsVbjI=
|
|
3
3
|
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
|
|
4
4
|
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
// A root-ops App's pages wait for its executor: the SDK's ExecutorApproval
|
|
3
3
|
// takes their place until an administrator approves it with the DSM
|
|
4
|
-
// password, and tells anyone else to ask one.
|
|
5
|
-
//
|
|
4
|
+
// password, and tells anyone else to ask one. With preload the pages mount
|
|
5
|
+
// hidden while the executor's status is read, so their own reads do not wait
|
|
6
|
+
// for it; a page that opens a dialog on its own waits for
|
|
7
|
+
// useExecutorPreload() to turn false. Without ctx.executor (a dev server)
|
|
8
|
+
// there is nothing to approve.
|
|
6
9
|
export const holdsPages = true
|
|
7
10
|
</script>
|
|
8
11
|
<script setup lang="ts">
|
|
@@ -11,6 +14,6 @@ import {ExecutorApproval} from '@synopackageland/sdk/vue'
|
|
|
11
14
|
defineProps<{ctx:Context;admin:boolean}>()
|
|
12
15
|
</script>
|
|
13
16
|
<template>
|
|
14
|
-
<ExecutorApproval v-if="ctx.executor" :admin="admin" :locale="ctx.locale" :ctx="ctx"><slot /></ExecutorApproval>
|
|
17
|
+
<ExecutorApproval v-if="ctx.executor" preload :admin="admin" :locale="ctx.locale" :ctx="ctx"><slot /></ExecutorApproval>
|
|
15
18
|
<slot v-else />
|
|
16
19
|
</template>
|
|
@@ -50,6 +50,18 @@ test('without an executor (a dev server) the App pages show at once',async()=>{
|
|
|
50
50
|
expect(root.textContent).toContain('Package status')
|
|
51
51
|
expect(root.textContent).not.toContain('An administrator must approve system access')
|
|
52
52
|
})
|
|
53
|
+
// preload: the App's own reads run alongside the executor's first status read.
|
|
54
|
+
test('while the executor status is read the App pages already load, hidden and inert',async()=>{
|
|
55
|
+
const answers:Array<(status:{state:'ready'})=>void>=[]
|
|
56
|
+
const executor={status:vi.fn(()=>new Promise(resolve=>{answers.push(resolve)})),authorize:vi.fn(),control:vi.fn()}
|
|
57
|
+
const root=open(true,executor as unknown as Context['executor']);await settle()
|
|
58
|
+
const hidden=root.querySelector('.executor-preloading')
|
|
59
|
+
expect(hidden?.hasAttribute('inert')).toBe(true)
|
|
60
|
+
expect(hidden?.textContent).toContain('Package status')
|
|
61
|
+
answers.forEach(answer=>answer({state:'ready'}));await settle()
|
|
62
|
+
expect(root.querySelector('.executor-preloading')).toBeNull()
|
|
63
|
+
expect((root.querySelector('textarea') as HTMLTextAreaElement).value).toBe('Hello Root')
|
|
64
|
+
})
|
|
53
65
|
// ExecutorApproval holds the pages: AppShell's ExecutorNotice would only repeat it.
|
|
54
66
|
test('while the executor awaits approval no notice repeats the approval page',async()=>{
|
|
55
67
|
for(const admin of [true,false]){
|
|
@@ -21,7 +21,10 @@ subscriptions; unmount disposes subscriptions and ignores late responses.
|
|
|
21
21
|
`--with root-ops` adds the existing DSM approval gate for fixed `root/*.sh`
|
|
22
22
|
operations, and its `ExecutorGate.vue` holds the pages with the SDK's
|
|
23
23
|
`ExecutorApproval` until the executor is approved: an administrator approves
|
|
24
|
-
with the DSM password, anyone else is told to ask one.
|
|
24
|
+
with the DSM password, anyone else is told to ask one. It passes `preload`: the
|
|
25
|
+
pages mount hidden while the executor's status is read, so their own reads run
|
|
26
|
+
alongside it; a page that opens a dialog by itself on mount waits until the
|
|
27
|
+
SDK's `useExecutorPreload()` is false. A delegate App keeps its
|
|
25
28
|
pages: `AppShell` shows the SDK's `ExecutorNotice` above them while its
|
|
26
29
|
executor waits for approval. `--with jobs` adds package-account jobs and schedules; it combines with root-ops and files. `--with files` enables current-session File Station access,
|
|
27
30
|
and the background picker uses the retained session provider.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"name": "native-dsm-vue-app",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@lucide/vue": "1.48.0",
|
|
10
|
-
"@synopackageland/sdk": "0.10.
|
|
10
|
+
"@synopackageland/sdk": "0.10.9",
|
|
11
11
|
"@synopackageland/ui": "0.9.8",
|
|
12
12
|
"vue": "3.5.43"
|
|
13
13
|
},
|
|
@@ -1148,9 +1148,9 @@
|
|
|
1148
1148
|
}
|
|
1149
1149
|
},
|
|
1150
1150
|
"node_modules/@synopackageland/sdk": {
|
|
1151
|
-
"version": "0.10.
|
|
1152
|
-
"resolved": "https://registry.npmjs.org/@synopackageland/sdk/-/sdk-0.10.
|
|
1153
|
-
"integrity": "sha512-
|
|
1151
|
+
"version": "0.10.9",
|
|
1152
|
+
"resolved": "https://registry.npmjs.org/@synopackageland/sdk/-/sdk-0.10.9.tgz",
|
|
1153
|
+
"integrity": "sha512-g96I1I+3uPe1NReK/VrLc0c3CmL0AU4xg0uYOeldxjM5W5Ns+MtcOpGS0oqq1CeSJbTGetqGr/qnG5IHSfhakQ==",
|
|
1154
1154
|
"license": "MIT",
|
|
1155
1155
|
"peerDependencies": {
|
|
1156
1156
|
"@lucide/vue": "^1.48.0",
|
|
@@ -104,8 +104,8 @@ dependencies = [
|
|
|
104
104
|
|
|
105
105
|
[[package]]
|
|
106
106
|
name = "syno-pkg-land-app"
|
|
107
|
-
version = "0.10.
|
|
108
|
-
source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.10.
|
|
107
|
+
version = "0.10.9"
|
|
108
|
+
source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.10.9#8ae214256950cb8e53f0b1d2bea52f5def93d90a"
|
|
109
109
|
dependencies = [
|
|
110
110
|
"libc",
|
|
111
111
|
"serde",
|
|
@@ -9,7 +9,7 @@ libc = "0.2"
|
|
|
9
9
|
serde = { version = "1", features = ["derive"] }
|
|
10
10
|
serde_json = "1"
|
|
11
11
|
# The SDK version is the tag; `synopkgland check` reads it from Cargo.lock.
|
|
12
|
-
syno-pkg-land-app = { git = "https://github.com/synopackageland/syno-pkg-land-sdk", tag = "v0.10.
|
|
12
|
+
syno-pkg-land-app = { git = "https://github.com/synopackageland/syno-pkg-land-sdk", tag = "v0.10.9" }
|
|
13
13
|
|
|
14
14
|
[profile.release]
|
|
15
15
|
# A handler panic becomes an "internal" reply; abort would end the App without one.
|