@webex/storage-adapter-session-storage 3.13.0-next.5 → 3.13.0-next.6
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/.repo-context.json +411 -0
- package/.sdd/manifest.json +376 -0
- package/AGENTS.md +208 -0
- package/docs/adr/0001-retain-product-readme.md +94 -0
- package/docs/adr/index.md +25 -0
- package/docs/architecture.md +212 -0
- package/docs/getting-started.md +123 -0
- package/docs/index.md +43 -0
- package/docs/specs/README.md +68 -0
- package/package.json +8 -8
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +481 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- sdd-generated-metadata
|
|
2
|
+
doc_kind: standing-doc
|
|
3
|
+
generated_from: adr-index@0.3.0
|
|
4
|
+
generated_by: claude-code
|
|
5
|
+
approved_by: rarajes2@cisco.com
|
|
6
|
+
updated_at: 2026-11-13T06:13:09Z
|
|
7
|
+
validation_status: pass
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# Architectural decision records
|
|
11
|
+
|
|
12
|
+
Numbered, append-only records of structural decisions affecting this package and its documentation.
|
|
13
|
+
Add a concrete ADR (for example, `0042-cache-policy.md`) when a decision is non-obvious, hard to
|
|
14
|
+
reverse, or worth explaining to a future contributor. Do not edit an accepted decision in place when
|
|
15
|
+
its outcome changes; supersede it with a new ADR and link both records.
|
|
16
|
+
|
|
17
|
+
## Index
|
|
18
|
+
|
|
19
|
+
- [ADR-0001 - Retain the product README](0001-retain-product-readme.md) — accepted 2026-11-13
|
|
20
|
+
|
|
21
|
+
Add new entries as ADRs are accepted. Keep this list in numeric order.
|
|
22
|
+
|
|
23
|
+
Each ADR should state its context, decision, alternatives, consequences, and the condition that would
|
|
24
|
+
cause the team to revisit it. Record the deciders, any superseded decision, and the constraint future
|
|
25
|
+
changes must preserve.
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Architecture
|
|
3
|
+
title: '@webex/storage-adapter-session-storage architecture'
|
|
4
|
+
description: Package-wide boundaries, resources, interactions, dependencies, and cross-cutting architecture.
|
|
5
|
+
tags: [architecture]
|
|
6
|
+
---
|
|
7
|
+
<!-- sdd-generated-metadata
|
|
8
|
+
doc_kind: standing-doc
|
|
9
|
+
generated_from: architecture@0.3.0
|
|
10
|
+
generated_by: claude-code
|
|
11
|
+
approved_by: rarajes2@cisco.com
|
|
12
|
+
updated_at: 2026-11-13T06:13:09Z
|
|
13
|
+
validation_status: pass
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# @webex/storage-adapter-session-storage architecture
|
|
17
|
+
|
|
18
|
+
Canonical architecture for this package. Behavior lives in the
|
|
19
|
+
[sessionStorage adapter specification](../src/docs/README.md). This page owns package boundaries,
|
|
20
|
+
the contract index, and how the package meets the webex-core storage layer.
|
|
21
|
+
|
|
22
|
+
Related context: [specification registry](specs/README.md) ·
|
|
23
|
+
[package agent instructions](../AGENTS.md)
|
|
24
|
+
|
|
25
|
+
## Applicability
|
|
26
|
+
|
|
27
|
+
| Condition ID | Status | Evidence or reason | Owned section |
|
|
28
|
+
| ------------------------------------ | ---------- | ------------------ | ------------- |
|
|
29
|
+
| `repo.owns_datastore` | Applicable | `src/index.js` owns the layout of the JSON document under the basekey in sessionStorage | Repository data and schema |
|
|
30
|
+
| `repo.holds_client_state` | N/A | `src/index.js` keeps only per-binding namespace and logger in WeakMaps | Client state model |
|
|
31
|
+
| `repo.components_interact` | N/A | One source file, `src/index.js` | Dependency and interaction topology |
|
|
32
|
+
| `repo.domain_data_across_components` | N/A | One resource owns the only data shape | Object and data ownership |
|
|
33
|
+
| `repo.caches_data` | N/A | Every get, put, and del re-reads storage in `src/index.js` | Caching catalog |
|
|
34
|
+
| `repo.observability_convention` | Applicable | Every call logs one info line with the session-storage-store-adapter prefix in `src/index.js` | Observability patterns |
|
|
35
|
+
| `repo.deploys_to_infra` | N/A | Library published to npm (`package.json`); no service runtime | Runtime and infrastructure |
|
|
36
|
+
| `repo.shared_base_libs` | Applicable | `babel.config.js`, `.eslintrc.js`, and `jest.config.js` re-export the shared legacy configs | Shared and base libraries |
|
|
37
|
+
| `repo.is_monorepo` | N/A | This SDD root is one package; the workspace around it is out of scope | Package map and inter-package dependencies |
|
|
38
|
+
| `repo.multi_platform` | N/A | Browser only: `src/index.js` uses the sessionStorage global with no platform branch | Platform matrix |
|
|
39
|
+
| `repo.published_package` | Applicable | `package.json` name and deploy:npm | Release and versioning |
|
|
40
|
+
| `repo.embedded_in_host` | Applicable | The instance is placed in a webex-core storage adapter slot and driven by WebexStore | Host integration and theming |
|
|
41
|
+
| `repo.exposes_commands_or_artifacts` | Applicable | build:src in `package.json` writes dist | Commands and generated artifacts |
|
|
42
|
+
| `repo.cross_repo_deps_material` | N/A | Depends only on workspace packages and the browser; no external service or repository | Cross-repository topology |
|
|
43
|
+
| `repo.security_arch_warranted` | Applicable | Host state is stored as plaintext readable by origin scripts, and a caller-chosen namespace can pollute a built-in prototype (`src/index.js`) | Security architecture |
|
|
44
|
+
|
|
45
|
+
## Design overview
|
|
46
|
+
|
|
47
|
+
`@webex/storage-adapter-session-storage` is a published JavaScript library with one module. It
|
|
48
|
+
default-exports `StorageAdapterSessionStorage`, a webex-core storage adapter backed by the browser
|
|
49
|
+
`sessionStorage` API. An application constructs it with a basekey and assigns the instance to a
|
|
50
|
+
webex-core adapter slot; webex-core `WebexStore` then binds one namespace per plugin and calls `get`,
|
|
51
|
+
`put`, `del`, and `clear` on the bindings.
|
|
52
|
+
|
|
53
|
+
All namespaces of one instance share one JSON document under the basekey. The package registers no
|
|
54
|
+
plugin and has no side effects on import. No workspace package configures it; webex-core's two
|
|
55
|
+
adapter slots default to its in-memory adapter, and the `webex` browser bundle wires the localStorage
|
|
56
|
+
sibling instead.
|
|
57
|
+
|
|
58
|
+
## Resource inventory and responsibilities
|
|
59
|
+
|
|
60
|
+
| Resource | Kind | Responsibility | Owner | Source | Detailed specification |
|
|
61
|
+
| -------- | ---- | -------------- | ----- | ------ | ---------------------- |
|
|
62
|
+
| sessionStorage adapter | package (one module) | Store webex-core namespaces in one sessionStorage JSON document per basekey | @webex/web-client | src | [`src/docs/README.md`](../src/docs/README.md) |
|
|
63
|
+
|
|
64
|
+
## Interaction and execution flows
|
|
65
|
+
|
|
66
|
+
Representative flow: an application configures the adapter, a plugin's persisted state is written
|
|
67
|
+
and read back, and logout purges it.
|
|
68
|
+
|
|
69
|
+
```mermaid
|
|
70
|
+
flowchart LR
|
|
71
|
+
App[application config] -->|new StorageAdapterSessionStorage basekey| Slot[webex-core adapter slot]
|
|
72
|
+
Slot --> Store[webex-core WebexStore]
|
|
73
|
+
Store -->|bind namespace, logger| Adapter[StorageAdapterSessionStorage]
|
|
74
|
+
Store -->|get, put, del| Binding[Bound]
|
|
75
|
+
Store -->|clear on logout| Binding
|
|
76
|
+
Binding -->|getItem, setItem, removeItem basekey| SS[browser sessionStorage]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
| From | To | Interaction or transport | Purpose | Failure or compatibility behavior |
|
|
80
|
+
| ---- | -- | ------------------------ | ------- | --------------------------------- |
|
|
81
|
+
| Application | webex-core config | Assigns the instance to `storage.boundedAdapter` or `storage.unboundedAdapter` | Select this adapter | None of its own; the slot is read on each use |
|
|
82
|
+
| `WebexStore` | `bind` | In-process call inside a promise executor | One binding per namespace per store | Rejections and the logger throw reject `_getBinding` |
|
|
83
|
+
| `WebexStore` | `get`, `put`, `del`, `clear` | In-process calls | Read, write, delete, purge | Errors pass through; `clear` can throw synchronously without the global |
|
|
84
|
+
| Binding | `sessionStorage` | Synchronous Web Storage calls on one key | Persist the document | Parse, quota, and missing-global errors; see the module failure-mode table |
|
|
85
|
+
|
|
86
|
+
## Dependency topology
|
|
87
|
+
|
|
88
|
+
| Dependency | Type | Used by | Purpose | Version, failure, or fallback policy |
|
|
89
|
+
| ---------- | ---- | ------- | ------- | ------------------------------------ |
|
|
90
|
+
| `@webex/webex-core` | Internal, runtime | `src/index.js` | `NotFoundError` for absent keys; the host that drives the adapter | `workspace:*`; storage spec consulted (src/lib/storage/docs/README.md) |
|
|
91
|
+
| Browser `sessionStorage` | Platform | `src/index.js` | Backing store | No feature detection; absent in Node |
|
|
92
|
+
| `@webex/storage-adapter-spec` | Internal, declared runtime, used by tests only | `test/unit/spec` | Shared adapter contract suite | `workspace:*`; spec consulted (src/docs/README.md) |
|
|
93
|
+
| `@webex/test-helper-mocha` | Internal, declared runtime and dev, used by tests only | `test/unit/spec` | `skipInNode` | `workspace:*` |
|
|
94
|
+
| `@webex/babel-config-legacy`, `@webex/eslint-config-legacy`, `@webex/jest-config-legacy`, `@webex/legacy-tools` | Internal, dev | Package tooling | Build, lint, and test stack | `workspace:*` |
|
|
95
|
+
| `@webex/test-helper-chai`, `@webex/test-helper-mock-webex`, `@webex/test-helper-test-users` | Internal, dev | Declared only | None imported by this package's files | `workspace:*` |
|
|
96
|
+
|
|
97
|
+
No import cycle exists: webex-core does not import this package.
|
|
98
|
+
|
|
99
|
+
## Public and consumer surfaces
|
|
100
|
+
|
|
101
|
+
| Surface | Type | Owner | Consumers | Compatibility policy | Source |
|
|
102
|
+
| ------- | ---- | ----- | --------- | -------------------- | ------ |
|
|
103
|
+
| `storage-adapter-session-storage-sdk`: default export `StorageAdapterSessionStorage` and its `bind`, `get`, `put`, `del`, `clear` shape | SDK, published to npm | sessionStorage adapter | Applications configuring webex-core adapter slots; no workspace package | No package rule declared; see Release and versioning | `package.json`, `src/index.js` |
|
|
104
|
+
| `session-storage-bounded-document`: the JSON document under the basekey | File (at rest), internal | sessionStorage adapter | This module only | No version field; see Repository data and schema | `src/index.js` |
|
|
105
|
+
|
|
106
|
+
The contracts this package requires, `webex-core-store-adapter-interface` and
|
|
107
|
+
`webex-core-storage-errors`, are registered in `.sdd/manifest.json` `contract_catalog`.
|
|
108
|
+
|
|
109
|
+
## Repository data and schema
|
|
110
|
+
|
|
111
|
+
| Datastore or schema | Owning resource | Source of truth | Migration and compatibility rule |
|
|
112
|
+
| ------------------- | --------------- | --------------- | -------------------------------- |
|
|
113
|
+
| `sessionStorage[basekey]`, one JSON document of namespaces and keys | sessionStorage adapter | `src/index.js` | None declared: no version field, migration, or schema check. Details in the module specification's [Data, schema, and migration discipline](../src/docs/README.md#data-schema-and-migration-discipline) |
|
|
114
|
+
|
|
115
|
+
## Cross-cutting architecture
|
|
116
|
+
|
|
117
|
+
### Security
|
|
118
|
+
|
|
119
|
+
- Trust boundaries and identity flow: see [Security architecture](#security-architecture).
|
|
120
|
+
- Sensitive surfaces and data classes: whatever the host persists through the slot; in the bounded
|
|
121
|
+
slot that includes `@persist` state such as credentials.
|
|
122
|
+
- Encryption and secret boundaries: see [Security architecture](#security-architecture).
|
|
123
|
+
|
|
124
|
+
### Observability and operations
|
|
125
|
+
|
|
126
|
+
- Logging and correlation: see [Observability patterns](#observability-patterns).
|
|
127
|
+
- Metrics, traces, and audit signals: none.
|
|
128
|
+
- Ownership and operational entry points: the workspace `.github/CODEOWNERS` line for
|
|
129
|
+
`packages/@webex/storage-adapter-session-storage` assigns `@webex/web-client`. No dashboards or
|
|
130
|
+
runbooks are recorded in this package.
|
|
131
|
+
|
|
132
|
+
### Quality attributes
|
|
133
|
+
|
|
134
|
+
- Compatibility: hosts rely on the constructor signature, the adapter method shape, the
|
|
135
|
+
`NotFoundError` type for absent keys, and the bind error messages the shared suite matches.
|
|
136
|
+
- Latency: every operation is synchronous main-thread work; writes cost the size of the whole
|
|
137
|
+
document.
|
|
138
|
+
- Test confidence: no test route executes a case (unit tier skips all 21, karma completes 0); no
|
|
139
|
+
coverage threshold exists.
|
|
140
|
+
|
|
141
|
+
## Observability patterns
|
|
142
|
+
|
|
143
|
+
| Signal | Convention or required fields | Propagation or naming rule | Primary evidence |
|
|
144
|
+
| ------- | ----------------------------- | -------------------------- | ---------------- |
|
|
145
|
+
| Logs | One `info` line per `bind`, `get`, `put`, `del`, and `clear` through the logger passed to `bind`; the key name is included for get, put, and del; values are never logged | Messages start `session-storage-store-adapter:` | `src/index.js` |
|
|
146
|
+
| Metrics | None | — | `src/index.js` |
|
|
147
|
+
| Traces | None | — | `src/index.js` |
|
|
148
|
+
| Audit | None | — | `src/index.js` |
|
|
149
|
+
|
|
150
|
+
## Shared and base libraries
|
|
151
|
+
|
|
152
|
+
| Library | Inherited responsibility | Consumers | Version floor | Compatibility rule |
|
|
153
|
+
| ------- | ------------------------ | --------- | ------------- | ------------------ |
|
|
154
|
+
| `@webex/webex-core` storage errors | `NotFoundError` (built on `StorageError`) | `src/index.js` | `workspace:*` | Keep rejecting absent keys with this type |
|
|
155
|
+
| `@webex/babel-config-legacy`, `@webex/eslint-config-legacy`, `@webex/jest-config-legacy`, `@webex/legacy-tools` | Build, lint, and test through one-line config files | Package tooling | `workspace:*` | Do not fork the configs locally |
|
|
156
|
+
|
|
157
|
+
## Release and versioning
|
|
158
|
+
|
|
159
|
+
| Artifact | Publish target | Versioning rule | Deprecation window | Changelog or migration obligation |
|
|
160
|
+
| -------- | -------------- | --------------- | ------------------ | --------------------------------- |
|
|
161
|
+
| @webex/storage-adapter-session-storage | npm through `deploy:npm` | None declared in the package; the workspace release pipeline sets versions | None declared | None in the package; the workspace owns changelog generation |
|
|
162
|
+
|
|
163
|
+
## Host integration and theming
|
|
164
|
+
|
|
165
|
+
| Host or integration | Mount or entry contract | Required providers or peers | Theming and accessibility constraints |
|
|
166
|
+
| ------------------- | ----------------------- | --------------------------- | ------------------------------------- |
|
|
167
|
+
| webex-core storage layer | An instance in `config.storage.boundedAdapter` or `config.storage.unboundedAdapter`; `WebexStore` calls `bind(namespace, {logger})` | `@webex/webex-core` exporting `NotFoundError`; a logger with `info`; a browser context | None; the module renders nothing. Details in the module specification's [Host integration and theming](../src/docs/README.md#host-integration-and-theming) |
|
|
168
|
+
|
|
169
|
+
## Commands and generated artifacts
|
|
170
|
+
|
|
171
|
+
| Command or artifact | Owner | Inputs | Output or side effect | Compatibility boundary |
|
|
172
|
+
| ------------------- | ----- | ------ | --------------------- | ---------------------- |
|
|
173
|
+
| `yarn workspace @webex/storage-adapter-session-storage build:src` | Package scripts | `src` | Writes `dist/` (JavaScript and source map) through `webex-legacy-tools` | `dist/` is generated and ignored by Git |
|
|
174
|
+
| `yarn workspace @webex/storage-adapter-session-storage build` | Package scripts | `src` | Runs `build:src` | Same output |
|
|
175
|
+
| `yarn workspace @webex/storage-adapter-session-storage test:unit` | Package scripts | `test/unit/spec` | Jest through `webex-legacy-tools`; the spec loads `dist/` | Currently skips every case under Node |
|
|
176
|
+
| `yarn workspace @webex/storage-adapter-session-storage test:style` | Package scripts | `src` | ESLint run | The shared config ignores `docs/**` and `*.md` |
|
|
177
|
+
| `yarn workspace @webex/storage-adapter-session-storage test:browser` | Package scripts | `test/unit/spec` | Karma in headless Chrome and Firefox | Currently completes 0 tests and exits 0 |
|
|
178
|
+
|
|
179
|
+
## Security architecture
|
|
180
|
+
|
|
181
|
+
```mermaid
|
|
182
|
+
flowchart LR
|
|
183
|
+
Host[webex-core WebexStore] -->|namespace, key, value| Adapter[sessionStorage adapter]
|
|
184
|
+
Adapter -->|plaintext JSON under basekey| SS[browser sessionStorage]
|
|
185
|
+
Other[other scripts on the origin] -->|read and write the same entry| SS
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
- The adapter holds no credential and performs no encryption. Values are stored as plaintext JSON,
|
|
189
|
+
readable and writable by any script that shares the origin's session storage area.
|
|
190
|
+
- Input from the storage area is trusted without validation, so content written by another script
|
|
191
|
+
can fabricate reads or swallow writes (module `MOD-017`).
|
|
192
|
+
- The namespace reaches `bind` from the host; namespace `__proto__` pollutes a built-in prototype
|
|
193
|
+
(module `MOD-016`). Its exposure and the needed fix are recorded once, in the module
|
|
194
|
+
specification's [Pitfalls and constraints](../src/docs/README.md#pitfalls-and-constraints).
|
|
195
|
+
- Logs carry key names, never values (see [Observability patterns](#observability-patterns)).
|
|
196
|
+
|
|
197
|
+
## Domain language
|
|
198
|
+
|
|
199
|
+
| Term | Repository-specific meaning | Authoritative source |
|
|
200
|
+
| ---- | --------------------------- | -------------------- |
|
|
201
|
+
| Basekey | The sessionStorage key under which one adapter instance keeps its whole document | `src/index.js` |
|
|
202
|
+
| Namespace | A host-chosen partition inside the document; webex-core uses one per plugin | `src/index.js` |
|
|
203
|
+
| Binding (`Bound`) | The object `bind` resolves, tied to one namespace and logger | `src/index.js` |
|
|
204
|
+
| Adapter slot | `storage.boundedAdapter` or `storage.unboundedAdapter` in webex-core config | Sibling package webex-core, src/config.js |
|
|
205
|
+
|
|
206
|
+
## References and maintenance
|
|
207
|
+
|
|
208
|
+
- Decisions: [adr/](adr/index.md)
|
|
209
|
+
- Instantiated specifications and routing: [specs/README.md](specs/README.md)
|
|
210
|
+
- Repository rules and patterns: [package agent instructions](../AGENTS.md)
|
|
211
|
+
- Update this document in the same change that alters package boundaries, resource ownership,
|
|
212
|
+
cross-resource interaction, or cross-cutting architecture.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Getting Started
|
|
3
|
+
title: Getting started
|
|
4
|
+
description: Local setup, build, run, and test routing for @webex/storage-adapter-session-storage.
|
|
5
|
+
tags: [onboarding]
|
|
6
|
+
---
|
|
7
|
+
<!-- sdd-generated-metadata
|
|
8
|
+
doc_kind: standing-doc
|
|
9
|
+
generated_from: getting-started@0.3.0
|
|
10
|
+
generated_by: claude-code
|
|
11
|
+
approved_by: rarajes2@cisco.com
|
|
12
|
+
updated_at: 2026-11-13T06:13:09Z
|
|
13
|
+
validation_status: pass
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# Getting started
|
|
17
|
+
|
|
18
|
+
Onboarding for **@webex/storage-adapter-session-storage**, a package inside the `webex-js-sdk` Yarn
|
|
19
|
+
workspace. Run every command from the workspace root: `yarn` to install, and
|
|
20
|
+
`yarn workspace @webex/storage-adapter-session-storage <script>` for the package scripts.
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
| Tool or access | Version or requirement |
|
|
25
|
+
| -------------- | ---------------------- |
|
|
26
|
+
| Node.js | Use 22.14: the workspace root `AGENTS.md` requires it and the workspace `.nvmrc` selects `lts/jod` (Node 22). This package's `engines` accepts `>=16`. The workspace root `package.json` `engines.node` reads `18.x`, which conflicts with the other pins; the build and lint pass on 22.14 |
|
|
27
|
+
| Yarn | `yarn@3.4.1` (`packageManager` in the workspace root `package.json`) |
|
|
28
|
+
| Registry or account access | N/A for building, unit tests, and linting |
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
yarn
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The workspace `deploy.yml` workflow installs with the same command.
|
|
37
|
+
|
|
38
|
+
Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling `dist/`) is owned by the
|
|
39
|
+
workspace root; see [Prebuilding](../../../../CONTRIBUTING.md#prebuilding).
|
|
40
|
+
|
|
41
|
+
## Build
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
yarn workspace @webex/storage-adapter-session-storage build:src
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`build:src` writes `dist/index.js` and its source map through `webex-legacy-tools`. `dist/` is
|
|
48
|
+
ignored by Git. The `build` script runs `build:src`; the package emits no type declarations.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
yarn workspace @webex/storage-adapter-session-storage build
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Run
|
|
55
|
+
|
|
56
|
+
N/A — this is a library with no start script and no side effects on import. To use it, an
|
|
57
|
+
application constructs `new StorageAdapterSessionStorage(basekey)` and assigns the instance to a
|
|
58
|
+
webex-core storage adapter slot; see the
|
|
59
|
+
[module specification](../src/docs/README.md#host-integration-and-theming). It needs a browser:
|
|
60
|
+
under Node every storage call fails because `sessionStorage` does not exist.
|
|
61
|
+
|
|
62
|
+
## Tests
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
yarn workspace @webex/storage-adapter-session-storage test:unit
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
yarn workspace @webex/storage-adapter-session-storage test:style
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
| Tier | Command | Test location | Framework | External dependencies |
|
|
73
|
+
| ---- | ------- | ------------- | --------- | --------------------- |
|
|
74
|
+
| Unit | `yarn workspace @webex/storage-adapter-session-storage test:unit` | `test/unit/spec` | jest (`webex-legacy-tools test --unit --runner jest`) running the shared suite from `@webex/storage-adapter-spec` | None |
|
|
75
|
+
|
|
76
|
+
`test:style` lints `src/` with eslint through `@webex/eslint-config-legacy`.
|
|
77
|
+
|
|
78
|
+
- Coverage or quality gate: none; the package defines no coverage script, and the legacy Jest
|
|
79
|
+
configuration it re-exports sets no threshold
|
|
80
|
+
- Enforcement source: N/A
|
|
81
|
+
- Test environment or QA dependencies: none for unit tests and lint
|
|
82
|
+
|
|
83
|
+
Read the unit result carefully: `yarn workspace @webex/storage-adapter-session-storage test:unit` exits 0 with **21 skipped and 0 run** (checked
|
|
84
|
+
2026-11-13). The test file wraps the shared suite in `skipInNode`, and the jest environment is Node,
|
|
85
|
+
so nothing executes. The test file imports the package by name, which loads `dist/index.js`, so run
|
|
86
|
+
`yarn workspace @webex/storage-adapter-session-storage build:src` first whenever the suite does run.
|
|
87
|
+
|
|
88
|
+
`yarn workspace @webex/storage-adapter-session-storage test:browser` (manifest command `browser-test`) runs `webex-legacy-tools test --unit --runner
|
|
89
|
+
karma` over `test/unit/spec` in headless Chrome and Firefox. It exits 0 but reports
|
|
90
|
+
`ReferenceError: beforeAll is not defined` and "0 tests completed" (checked 2026-11-13), because the
|
|
91
|
+
shared suite calls a Jest global that mocha does not define. It is not listed in the table above
|
|
92
|
+
because it verifies nothing; read its SUMMARY line, not its exit code.
|
|
93
|
+
|
|
94
|
+
Do not run the aggregate `test` script in `package.json`. It runs `test:style` and `test:unit`, then
|
|
95
|
+
exits 1 with `Couldn't find a script named "test:integration"` (checked 2026-11-13). It is
|
|
96
|
+
deliberately not a manifest command; run the commands above instead.
|
|
97
|
+
|
|
98
|
+
## Configuration and secrets
|
|
99
|
+
|
|
100
|
+
- Required configuration: none in the package; the host chooses a basekey and an adapter slot
|
|
101
|
+
- Environment overrides: none read by `src/`
|
|
102
|
+
- Secret source: N/A; the package holds no secret, but stores host data as plaintext (see the
|
|
103
|
+
[architecture security view](architecture.md#security-architecture))
|
|
104
|
+
- Package or artifact access: N/A
|
|
105
|
+
- Required neighboring packages: `@webex/webex-core`, and for tests `@webex/storage-adapter-spec`
|
|
106
|
+
and `@webex/test-helper-mocha`, all resolved through the workspace
|
|
107
|
+
- Platform, simulator, device, or SDK setup: none for build and lint; runtime use needs a browser
|
|
108
|
+
- Never commit credentials or copy production secrets into a local config.
|
|
109
|
+
|
|
110
|
+
## First-run verification
|
|
111
|
+
|
|
112
|
+
1. Run `yarn workspace @webex/storage-adapter-session-storage build:src` and check that it reports `Built storage-adapter-session-storage: 1 files`.
|
|
113
|
+
2. Run `yarn workspace @webex/storage-adapter-session-storage test:unit` and check that it reports 21 skipped tests.
|
|
114
|
+
3. Run `yarn workspace @webex/storage-adapter-session-storage test:style`.
|
|
115
|
+
|
|
116
|
+
Expected result: all three commands exit zero. `test:style` reports no error in `src/`; it prints one
|
|
117
|
+
"File ignored" warning for `src/docs/README.md`.
|
|
118
|
+
|
|
119
|
+
## Next steps
|
|
120
|
+
|
|
121
|
+
- [Package architecture](architecture.md)
|
|
122
|
+
- [Specification registry](specs/README.md)
|
|
123
|
+
- [Documentation index](index.md)
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
okf_version: '0.1'
|
|
3
|
+
---
|
|
4
|
+
<!-- sdd-generated-metadata
|
|
5
|
+
doc_kind: standing-doc
|
|
6
|
+
generated_from: docs-index@0.3.0
|
|
7
|
+
generated_by: claude-code
|
|
8
|
+
approved_by: rarajes2@cisco.com
|
|
9
|
+
updated_at: 2026-11-13T06:13:09Z
|
|
10
|
+
validation_status: pass
|
|
11
|
+
-->
|
|
12
|
+
|
|
13
|
+
# @webex/storage-adapter-session-storage documentation
|
|
14
|
+
|
|
15
|
+
Doc map for developers and agents working on the sessionStorage storage adapter.
|
|
16
|
+
|
|
17
|
+
## Start here
|
|
18
|
+
|
|
19
|
+
- [Getting started](getting-started.md)
|
|
20
|
+
- [Package architecture](architecture.md)
|
|
21
|
+
|
|
22
|
+
## Decisions
|
|
23
|
+
|
|
24
|
+
- [adr/](adr/index.md) — architectural decision records
|
|
25
|
+
|
|
26
|
+
## Specifications and contracts
|
|
27
|
+
|
|
28
|
+
- [architecture.md](architecture.md) — canonical package architecture and contract index
|
|
29
|
+
- [specs/README.md](specs/README.md) — manifest-backed module and contract registry
|
|
30
|
+
- [`src/docs/README.md`](../src/docs/README.md) — the sessionStorage adapter specification beside its
|
|
31
|
+
code
|
|
32
|
+
- [adr/](adr/index.md) — concrete architectural decisions; blank ADR templates remain under the
|
|
33
|
+
monorepo root `.sdd/`
|
|
34
|
+
|
|
35
|
+
This package is a library, so there is no service specification and no OpenAPI document. Exact
|
|
36
|
+
contract details live in the native sources linked from the architecture index: `package.json` for
|
|
37
|
+
the published package and `src/index.js` for the adapter and its stored document.
|
|
38
|
+
|
|
39
|
+
## Related repository resources
|
|
40
|
+
|
|
41
|
+
- [`README.md`](../README.md) — retained npm page; context only, and its description calls the
|
|
42
|
+
package a localStorage adapter, see [ADR-0001](adr/0001-retain-product-readme.md)
|
|
43
|
+
- [`AGENTS.md`](../AGENTS.md) — agent instructions for this package
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Reference
|
|
3
|
+
title: Specification registry
|
|
4
|
+
description: Canonical specification registry and change-routing guide.
|
|
5
|
+
tags: [specifications, registry]
|
|
6
|
+
---
|
|
7
|
+
<!-- sdd-generated-metadata
|
|
8
|
+
doc_kind: standing-doc
|
|
9
|
+
generated_from: spec-index@0.3.0
|
|
10
|
+
generated_by: claude-code
|
|
11
|
+
approved_by: rarajes2@cisco.com
|
|
12
|
+
updated_at: 2026-11-13T06:13:09Z
|
|
13
|
+
validation_status: pass
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# Specification registry
|
|
17
|
+
|
|
18
|
+
Use this page to find the canonical package architecture and every instantiated module specification
|
|
19
|
+
plus native contract. Keep technical facts in one owning document and use this page only for
|
|
20
|
+
navigation, ownership, status, and change/test routing.
|
|
21
|
+
|
|
22
|
+
Start with the [package architecture](../architecture.md). No service specification exists because this
|
|
23
|
+
package is a library.
|
|
24
|
+
|
|
25
|
+
## Document roles
|
|
26
|
+
|
|
27
|
+
| Document | Canonical ownership |
|
|
28
|
+
| -------- | ------------------- |
|
|
29
|
+
| [Package architecture](../architecture.md) | Package boundaries, resource inventory, interactions, dependency topology, and cross-cutting architecture |
|
|
30
|
+
| Module specifications | Stable behavior and design at each manifest-routed `<module-path>/docs/README.md` |
|
|
31
|
+
| [ADR](../adr/index.md) | A durable decision, its deciders, rationale, consequences, and supersession lineage |
|
|
32
|
+
|
|
33
|
+
## Instantiated specification registry
|
|
34
|
+
|
|
35
|
+
| Resource | Role | Canonical path | Owner | Status | Last verified |
|
|
36
|
+
| -------- | ---- | -------------- | ----- | ------ | ------------- |
|
|
37
|
+
| Package | Architecture | `docs/architecture.md` | @webex/web-client | Draft | 2026-11-13 |
|
|
38
|
+
| sessionStorage adapter | Module | `src/docs/README.md` | @webex/web-client | Draft | 2026-11-13 |
|
|
39
|
+
| Retain the product README | ADR | `docs/adr/0001-retain-product-readme.md` | @webex/web-client | Accepted | 2026-11-13 |
|
|
40
|
+
|
|
41
|
+
### Module registry
|
|
42
|
+
|
|
43
|
+
| Module | Responsibility | Manifest coverage state | Start here |
|
|
44
|
+
| --- | --- | --- | --- |
|
|
45
|
+
| `src/` | `StorageAdapterSessionStorage`: the webex-core storage adapter that keeps every namespace of one basekey in a single sessionStorage JSON document | Partial | `src/docs/README.md` |
|
|
46
|
+
|
|
47
|
+
Generator-side field measurement is complete (100%, assessed 2026-11-13). Independent validation
|
|
48
|
+
passed on 2026-11-13 with validator runtime `01a1d386-b645-7461-9a36-8a91051caadd` and no findings. The module stays Partial
|
|
49
|
+
because no test route executes a case and no characterization baseline is committed.
|
|
50
|
+
|
|
51
|
+
## Change and verification routing
|
|
52
|
+
|
|
53
|
+
| Change affects | Load and update | Verification route |
|
|
54
|
+
| -------------- | --------------- | ------------------ |
|
|
55
|
+
| Package boundaries or cross-cutting architecture | `docs/architecture.md` and applicable ADRs | `yarn workspace @webex/storage-adapter-session-storage build:src`, `yarn workspace @webex/storage-adapter-session-storage test:unit`, and `yarn workspace @webex/storage-adapter-session-storage test:style`, and the module spec |
|
|
56
|
+
| A stable code, package, or component boundary | `src/docs/README.md` | Build, unit tests, and lint |
|
|
57
|
+
| The adapter methods, bind checks, the stored document layout, or log lines | The owning architecture section, `src/docs/README.md`, and the native definition in `src/index.js` or `package.json` | Build, unit tests, and lint; the unit tier runs nothing today, so add a test that executes the changed path |
|
|
58
|
+
|
|
59
|
+
## Module and contract registration
|
|
60
|
+
|
|
61
|
+
The module specification is generated at the exact `modules[].canonical_spec` path recorded in
|
|
62
|
+
`.sdd/manifest.json`. Register every module and submodule in the Module registry above in manifest tree
|
|
63
|
+
order.
|
|
64
|
+
|
|
65
|
+
Contracts are registered in `.sdd/manifest.json` `contract_catalog` and indexed in
|
|
66
|
+
[`docs/architecture.md`](../architecture.md#public-and-consumer-surfaces) with a stable ID, publication
|
|
67
|
+
state, native source, and owning module. This page provides navigation and ownership rather than a copied
|
|
68
|
+
contract.
|
package/package.json
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@webex/storage-adapter-spec": "3.13.0-next.
|
|
24
|
-
"@webex/test-helper-mocha": "3.13.0-next.
|
|
25
|
-
"@webex/webex-core": "3.13.0-next.
|
|
23
|
+
"@webex/storage-adapter-spec": "3.13.0-next.2",
|
|
24
|
+
"@webex/test-helper-mocha": "3.13.0-next.2",
|
|
25
|
+
"@webex/webex-core": "3.13.0-next.6"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "yarn build:src",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
40
40
|
"@webex/jest-config-legacy": "0.0.0",
|
|
41
41
|
"@webex/legacy-tools": "0.0.0",
|
|
42
|
-
"@webex/test-helper-chai": "3.13.0-next.
|
|
43
|
-
"@webex/test-helper-mocha": "3.13.0-next.
|
|
44
|
-
"@webex/test-helper-mock-webex": "3.13.0-next.
|
|
45
|
-
"@webex/test-helper-test-users": "3.13.0-next.
|
|
42
|
+
"@webex/test-helper-chai": "3.13.0-next.2",
|
|
43
|
+
"@webex/test-helper-mocha": "3.13.0-next.2",
|
|
44
|
+
"@webex/test-helper-mock-webex": "3.13.0-next.2",
|
|
45
|
+
"@webex/test-helper-test-users": "3.13.0-next.2",
|
|
46
46
|
"eslint": "^8.24.0",
|
|
47
47
|
"prettier": "^2.7.1"
|
|
48
48
|
},
|
|
49
|
-
"version": "3.13.0-next.
|
|
49
|
+
"version": "3.13.0-next.6"
|
|
50
50
|
}
|