@jskit-ai/agent-docs 0.1.352 → 0.1.354
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/guide/agent/app-extras/assistant.md +70 -0
- package/guide/agent/app-setup/authentication.md +151 -2
- package/guide/agent/app-setup/database-layer.md +9 -0
- package/guide/agent/app-setup/service-keys.md +103 -0
- package/guide/agent/app-setup/upgrading-jskit.md +11 -2
- package/guide/agent/framework/data-access.md +13 -0
- package/guide/agent/framework/typed-features.md +10 -5
- package/guide/agent/index.md +2 -0
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +1 -1
- package/patterns/minimal-foundation/example/package.json +3 -3
- package/patterns/shell-foundation/example/package.json +4 -4
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/reference/autogen/PATTERN_INDEX.md +49 -38
- package/reference/autogen/packages/assistant-core.md +44 -8
- package/reference/autogen/packages/assistant-runtime.md +25 -0
- package/reference/autogen/packages/auth-core.md +4 -0
- package/reference/autogen/packages/auth-provider-local-core.md +13 -0
- package/reference/autogen/packages/auth-web.md +60 -16
- package/reference/autogen/packages/crud-core.md +3 -1
- package/reference/autogen/packages/database-runtime.md +1 -0
- package/reference/autogen/packages/http-web.md +1 -0
- package/reference/autogen/packages/realtime.md +2 -1
- package/reference/autogen/packages/resource-runtime.md +9 -0
- package/reference/autogen/packages/shell-web.md +35 -0
- package/reference/autogen/tooling/jskit-catalog.md +13 -6
- package/reference/autogen/tooling/jskit-release.md +12 -5
- package/reference/autogen/tooling/testUtils.md +1 -0
- package/skills/jskit/references/data-access.md +13 -0
- package/skills/jskit/references/database-layer.md +9 -0
- package/skills/jskit/references/heuristics/row-policies.md +1 -1
- package/skills/jskit/references/heuristics/ui-testing.md +3 -3
- package/skills/jskit/references/pattern-index.md +49 -38
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +3 -3
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +4 -4
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
- package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
- package/skills/jskit/references/patterns/auth/auth-surface/PATTERN.md +3 -0
- package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
- package/skills/jskit/references/patterns/auth/own-design-sign-in/PATTERN.md +141 -0
- package/skills/jskit/references/patterns/auth/own-design-sign-in/example/src/components/ConfirmItsYouDialog.vue +182 -0
- package/skills/jskit/references/patterns/auth/own-design-sign-in/example/src/theme/tokens.css +35 -0
- package/skills/jskit/references/patterns/auth/own-design-sign-in/example/src/views/auth/LoginView.vue +473 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +5 -5
- package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +3 -3
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookListPage.vue +1 -1
- package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/realtime/realtime-application/PATTERN.md +5 -1
- package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +3 -3
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +6 -6
- package/skills/jskit/references/typed-features.md +10 -5
|
@@ -101,29 +101,33 @@ Exports
|
|
|
101
101
|
Local functions
|
|
102
102
|
- `validationFieldMessages(validationResult)`
|
|
103
103
|
|
|
104
|
-
### `src/client/composables/
|
|
104
|
+
### `src/client/composables/useEmailChangeView.js`
|
|
105
105
|
Exports
|
|
106
|
-
- `
|
|
106
|
+
- `useEmailChangeView()`
|
|
107
107
|
|
|
108
|
-
### `src/client/composables/
|
|
108
|
+
### `src/client/composables/useLoginView.js`
|
|
109
109
|
Exports
|
|
110
|
-
- `
|
|
110
|
+
- `useLoginView({ fallbackReturnTo = "/" } = {})`
|
|
111
111
|
|
|
112
|
-
### `src/client/composables/
|
|
112
|
+
### `src/client/composables/useResetPasswordView.js`
|
|
113
113
|
Exports
|
|
114
|
-
- `
|
|
114
|
+
- `useResetPasswordView()`
|
|
115
115
|
|
|
116
|
-
### `src/client/composables/
|
|
116
|
+
### `src/client/composables/useSecondFactorProof.js`
|
|
117
117
|
Exports
|
|
118
|
-
- `
|
|
118
|
+
- `useSecondFactorProof({ submit, onDone })`
|
|
119
119
|
|
|
120
|
-
### `src/client/composables/
|
|
120
|
+
### `src/client/composables/useSecondFactorSettings.js`
|
|
121
121
|
Exports
|
|
122
|
-
- `
|
|
122
|
+
- `useSecondFactorSettings()`
|
|
123
123
|
|
|
124
|
-
### `src/client/composables/
|
|
124
|
+
### `src/client/composables/useSecondFactorStepUp.js`
|
|
125
125
|
Exports
|
|
126
|
-
- `
|
|
126
|
+
- `useSecondFactorStepUp()`
|
|
127
|
+
|
|
128
|
+
### `src/client/composables/useSignOutView.js`
|
|
129
|
+
Exports
|
|
130
|
+
- `useSignOutView()`
|
|
127
131
|
Local functions
|
|
128
132
|
- `readReturnToPathFromLocation({ allowedOrigins = [] } = {})`
|
|
129
133
|
- `navigateToPath(path, { replace = true } = {})`
|
|
@@ -288,10 +292,6 @@ Exports
|
|
|
288
292
|
- `startSecondFactorSetup()`
|
|
289
293
|
- `verifySecondFactor(proof)`
|
|
290
294
|
|
|
291
|
-
### `src/client/runtime/useLoginView.js`
|
|
292
|
-
Exports
|
|
293
|
-
- `useLoginView({ fallbackReturnTo = "/" } = {})`
|
|
294
|
-
|
|
295
295
|
### `src/client/runtime/useSignOut.js`
|
|
296
296
|
Exports
|
|
297
297
|
- `useSignOut({ currentSurface, goToEntry, authGuardRuntime = useRequiredAuthGuardRuntime(), returnTo, resolveReturnToPath })`
|
|
@@ -373,6 +373,10 @@ Exports
|
|
|
373
373
|
Exports
|
|
374
374
|
- None
|
|
375
375
|
|
|
376
|
+
### `src/client/views/SecondFactorProofFields.vue`
|
|
377
|
+
Exports
|
|
378
|
+
- None
|
|
379
|
+
|
|
376
380
|
### `src/client/views/SecondFactorProofForm.vue`
|
|
377
381
|
Exports
|
|
378
382
|
- None
|
|
@@ -463,6 +467,34 @@ Exports
|
|
|
463
467
|
|
|
464
468
|
### fixtures
|
|
465
469
|
|
|
470
|
+
### `fixtures/app-ui-kit/KitButton.vue`
|
|
471
|
+
Exports
|
|
472
|
+
- None
|
|
473
|
+
|
|
474
|
+
### `fixtures/app-ui-kit/KitDialog.vue`
|
|
475
|
+
Exports
|
|
476
|
+
- None
|
|
477
|
+
Local functions
|
|
478
|
+
- `show(open)`
|
|
479
|
+
|
|
480
|
+
### `fixtures/app-ui-kit/main.js`
|
|
481
|
+
Exports
|
|
482
|
+
- None
|
|
483
|
+
|
|
484
|
+
### `fixtures/app-ui-kit/vite.config.mjs`
|
|
485
|
+
Exports
|
|
486
|
+
- None
|
|
487
|
+
|
|
488
|
+
### `fixtures/own-design-sign-in/main.js`
|
|
489
|
+
Exports
|
|
490
|
+
- None
|
|
491
|
+
|
|
492
|
+
### `fixtures/own-design-sign-in/vite.config.mjs`
|
|
493
|
+
Exports
|
|
494
|
+
- None
|
|
495
|
+
Local functions
|
|
496
|
+
- `patternSource(pattern, file)`
|
|
497
|
+
|
|
466
498
|
### `fixtures/sign-in/main.js`
|
|
467
499
|
Exports
|
|
468
500
|
- None
|
|
@@ -529,3 +561,15 @@ Exports
|
|
|
529
561
|
### `patterns/auth-surface/example/src/views/auth/SignOutView.vue`
|
|
530
562
|
Exports
|
|
531
563
|
- None
|
|
564
|
+
|
|
565
|
+
### `patterns/own-design-sign-in/example/src/components/ConfirmItsYouDialog.vue`
|
|
566
|
+
Exports
|
|
567
|
+
- None
|
|
568
|
+
Local functions
|
|
569
|
+
- `switchCodeKind()`
|
|
570
|
+
|
|
571
|
+
### `patterns/own-design-sign-in/example/src/views/auth/LoginView.vue`
|
|
572
|
+
Exports
|
|
573
|
+
- None
|
|
574
|
+
Local functions
|
|
575
|
+
- `providerName(providerId)`
|
|
@@ -53,7 +53,7 @@ Local functions
|
|
|
53
53
|
### `src/server/jsonApiModule/actions.js`
|
|
54
54
|
Exports
|
|
55
55
|
- `assertCrudOperationName(operation = "")`
|
|
56
|
-
- `createCrudJsonApiActionDefinitions({ namespace, resource, surface, permissionForOperation, operations, scopeInputValidator, listFilterQueryValidator, operationInputs, actions, servedOverHttp })`
|
|
56
|
+
- `createCrudJsonApiActionDefinitions({ namespace, resource, surface, permissionForOperation, operations, scopeInputValidator, listFilterQueryValidator, operationInputs, actions, servedOverHttp, assistantHints = undefined })`
|
|
57
57
|
- `createCrudJsonApiActions({ namespace, resource, repository, service, scopeInputKeys, operationLifecycle, dependencies: actionDependencies, realtimeAudience, definitions: builtDefinitions, includedTypes = () => new Map(), ...definitionOptions })`
|
|
58
58
|
- `normalizeCrudOperationLifecycle(value)`
|
|
59
59
|
Local functions
|
|
@@ -61,7 +61,9 @@ Local functions
|
|
|
61
61
|
- `buildActionInput(resource, operation, scopeInputValidator, listFilterQueryValidator, operationInputs)`
|
|
62
62
|
- `omitInputKeys(input, keys)`
|
|
63
63
|
- `buildLifecycleContext(value)`
|
|
64
|
+
- `withRouteSummary(definition)`
|
|
64
65
|
- `normalizeAdditionalActions(definitions, { namespace, surface, permissionForAction, scopeInputValidator, servedOverHttp })`
|
|
66
|
+
- `normalizeOperationAssistantHints(hints, operations)`
|
|
65
67
|
|
|
66
68
|
### `src/server/jsonApiModule/assistantExtension.js`
|
|
67
69
|
Exports
|
|
@@ -86,6 +86,7 @@ Local functions
|
|
|
86
86
|
Exports
|
|
87
87
|
- `POSTGRES_MAINTENANCE_DATABASE`
|
|
88
88
|
- `dropCopiesIfThrows(knexConfig, databases, work)`
|
|
89
|
+
- `dropLeftTestDatabaseCopies(knexConfig, name, count)`
|
|
89
90
|
- `dropTestDatabaseCopies(knexConfig, databases)`
|
|
90
91
|
- `endTestDatabaseRun(knexConfig, databases, directory)`
|
|
91
92
|
- `rememberTestDatabaseCopies(knexConfig, databases)`
|
|
@@ -70,7 +70,7 @@ Exports
|
|
|
70
70
|
- `createAudienceContributors()`
|
|
71
71
|
- `createSocketRequest(socket)`
|
|
72
72
|
- `realtimeAuthenticationRequired(authService)`
|
|
73
|
-
- `revalidateSocket({ socket, authService, audiences, request, authenticateRequest })`
|
|
73
|
+
- `revalidateSocket({ socket, authService, audiences, request, authenticateRequest, reuseHeld = false })`
|
|
74
74
|
- `registerSocketAudienceBootstrap({ io, logger, authService, audiences })`
|
|
75
75
|
- `resolveAudienceTargets(audience, event, { logger, audienceScope })`
|
|
76
76
|
- `type AuthService`
|
|
@@ -97,6 +97,7 @@ Local functions
|
|
|
97
97
|
- `resolveSocketAuthentication(authService, socket, request = createSocketRequest(socket), authenticateRequest = authenticateWithoutRefresh(authService))`
|
|
98
98
|
- `sessionRefreshRequiredError()`
|
|
99
99
|
- `rememberSocketActorId(socket, actorId)`
|
|
100
|
+
- `holdUntilLoginEnds(socket, actor, holdSocket, logger)`
|
|
100
101
|
- `registerSocketAuthentication({ io, logger, authService })`
|
|
101
102
|
- `joinContributedRooms(socket, actorId, audiences)`
|
|
102
103
|
|
|
@@ -14,6 +14,15 @@ Use this on demand; do not load the full index at startup.
|
|
|
14
14
|
|
|
15
15
|
### src
|
|
16
16
|
|
|
17
|
+
### `src/server/anyapi.js`
|
|
18
|
+
Exports
|
|
19
|
+
- `AnyapiRegistry`
|
|
20
|
+
- `JsonRestApi`
|
|
21
|
+
- `RestApiAnyapiKnexPlugin`
|
|
22
|
+
- `RestApiPlugin`
|
|
23
|
+
- `RowPolicyPlugin`
|
|
24
|
+
- `ensureAnyApiSchema`
|
|
25
|
+
|
|
17
26
|
### `src/server/changeHorizon.js`
|
|
18
27
|
Exports
|
|
19
28
|
- `readChangeHorizon(name, db)`
|
|
@@ -730,6 +730,41 @@ Exports
|
|
|
730
730
|
- `type ShellRealtime`
|
|
731
731
|
- `type ShellLayoutStateProps`
|
|
732
732
|
- `type ShellNavigationLinkProps`
|
|
733
|
+
- `type ShellUi`
|
|
734
|
+
|
|
735
|
+
### `src/client/ui/index.js`
|
|
736
|
+
Exports
|
|
737
|
+
- `MATERIAL_TEXT`
|
|
738
|
+
- `SHELL_UI_KEY`
|
|
739
|
+
- `SHELL_UI_ROLES`
|
|
740
|
+
- `SHELL_UI_TEXT_ROLES`
|
|
741
|
+
- `ShellUiButton`
|
|
742
|
+
- `ShellUiDialog`
|
|
743
|
+
- `provideShellUi`
|
|
744
|
+
- `useShellUi`
|
|
745
|
+
|
|
746
|
+
### `src/client/ui/shellUi.js`
|
|
747
|
+
Exports
|
|
748
|
+
- `MATERIAL_TEXT`
|
|
749
|
+
- `SHELL_UI_KEY`
|
|
750
|
+
- `SHELL_UI_ROLES`
|
|
751
|
+
- `SHELL_UI_TEXT_ROLES`
|
|
752
|
+
- `defineShellUi(defaults)`
|
|
753
|
+
- `resolveShellUi(kit, defaults)`
|
|
754
|
+
- `useShellUiText()`
|
|
755
|
+
Local functions
|
|
756
|
+
- `isRecord(value)`
|
|
757
|
+
- `shown(value)`
|
|
758
|
+
- `component(role, value)`
|
|
759
|
+
- `textClasses(text)`
|
|
760
|
+
|
|
761
|
+
### `src/client/ui/ShellUiButton.vue`
|
|
762
|
+
Exports
|
|
763
|
+
- None
|
|
764
|
+
|
|
765
|
+
### `src/client/ui/ShellUiDialog.vue`
|
|
766
|
+
Exports
|
|
767
|
+
- None
|
|
733
768
|
|
|
734
769
|
### fixtures
|
|
735
770
|
|
|
@@ -20,12 +20,13 @@ Exports
|
|
|
20
20
|
Local functions
|
|
21
21
|
- `seconds(since)`
|
|
22
22
|
- `digest(file)`
|
|
23
|
-
- `buildFingerprint(appRoot, build, env = process.env)`
|
|
24
|
-
- `
|
|
23
|
+
- `buildFingerprint(appRoot, build, read = null, env = process.env)`
|
|
24
|
+
- `readModules(appRoot, modulesFile)`
|
|
25
|
+
- `runToCompletion(command, appRoot, environment = {})`
|
|
25
26
|
- `lastBuild(appRoot)`
|
|
26
27
|
- `isRunning(pid)`
|
|
27
28
|
- `lockBuild(appRoot)`
|
|
28
|
-
- `isCurrent(appRoot,
|
|
29
|
+
- `isCurrent(appRoot, build)`
|
|
29
30
|
|
|
30
31
|
### `scripts/browser-test-server.mjs`
|
|
31
32
|
Exports
|
|
@@ -55,12 +56,14 @@ Exports
|
|
|
55
56
|
### `scripts/browser-tests.mjs`
|
|
56
57
|
Exports
|
|
57
58
|
- `SETTINGS_VARIABLE`
|
|
58
|
-
- `browserTestConfig({ testDir = "./tests/e2e", port =
|
|
59
|
+
- `browserTestConfig({ testDir = "./tests/e2e", port = 0, server = "node ./bin/server.js", build = "npm run build", prepare = "", signIn = "", env = {}, health = "/api/health", globalTimeout, actionTimeout = ACTION_TIMEOUT_MS, navigationTimeout = NAVIGATION_TIMEOUT_MS, environment = process.env, cwd = process.cwd() } = {})`
|
|
59
60
|
- `browserTestWorkers({ env = process.env, argv = process.argv } = {})`
|
|
60
61
|
Local functions
|
|
61
62
|
- `positiveInteger(value)`
|
|
62
63
|
- `managedBaseUrl(env)`
|
|
63
64
|
- `commandLineWorkers(argv)`
|
|
65
|
+
- `listen(port)`
|
|
66
|
+
- `freeConsecutivePorts(host, count)`
|
|
64
67
|
- `preparedWorkerEnvironment(file, index)`
|
|
65
68
|
|
|
66
69
|
### `scripts/build-catalog.mjs`
|
|
@@ -369,6 +372,11 @@ Local functions
|
|
|
369
372
|
- `createWorkspaceMatcher(workspaces)`
|
|
370
373
|
- `collectNestedPackageJsonPaths(directory, results = [])`
|
|
371
374
|
|
|
375
|
+
### `scripts/project-migrations.mjs`
|
|
376
|
+
Exports
|
|
377
|
+
- `installedPackageMigrations(root)`
|
|
378
|
+
- `packageMigrationChanges(before, after, previousVersions)`
|
|
379
|
+
|
|
372
380
|
### `scripts/project-packages.mjs`
|
|
373
381
|
Exports
|
|
374
382
|
- `CATALOG_PACKAGE_ID`
|
|
@@ -393,7 +401,6 @@ Local functions
|
|
|
393
401
|
- `alignLockManifestRecord(lockRecord, manifest, localPackageNames)`
|
|
394
402
|
- `preparePackageLockForInstall(projectRoot, manifests, packageLockPath)`
|
|
395
403
|
- `findImports(root, packageIds)`
|
|
396
|
-
- `installedPackageMigrations(root)`
|
|
397
404
|
- `approveInstallScripts(manifest, declared)`
|
|
398
405
|
|
|
399
406
|
### `scripts/test-budget.mjs`
|
|
@@ -457,7 +464,7 @@ Exports
|
|
|
457
464
|
- `FILE_TIMES`
|
|
458
465
|
- `checkTestTimes({ bounds, files, tests, wallMs, stopped = [] })`
|
|
459
466
|
- `fileStop({ bound, recorded })`
|
|
460
|
-
- `reportTestTimes({ cwd, collected, directory, wallMs })`
|
|
467
|
+
- `reportTestTimes({ cwd, collected, directory, wallMs, filtered = false })`
|
|
461
468
|
- `writeFileStops({ cwd, files, directory })`
|
|
462
469
|
Local functions
|
|
463
470
|
- `seconds(ms)`
|
|
@@ -44,14 +44,17 @@ Local functions
|
|
|
44
44
|
### `src/npm-publication.mjs`
|
|
45
45
|
Exports
|
|
46
46
|
- `createPublicationInspection({ directory, registry, configPath = "", env = process.env })`
|
|
47
|
+
- `fileState(file)`
|
|
48
|
+
- `inParallel(items, work, limit = REGISTRY_CONCURRENCY)`
|
|
47
49
|
- `planPublication(records, options)`
|
|
48
|
-
- `snapshotFiles(root
|
|
50
|
+
- `snapshotFiles(root)`
|
|
49
51
|
Local functions
|
|
50
52
|
- `npmJson(args, { cwd, env = process.env, allowMissing = false } = {})`
|
|
51
53
|
- `matchesIntegrity(bytes, integrity)`
|
|
52
54
|
- `archiveContents(file)`
|
|
53
55
|
- `archiveManifest(file)`
|
|
54
56
|
- `runPackCommand(record, env)`
|
|
57
|
+
- `listFiles(root, relative, names)`
|
|
55
58
|
- `sameSnapshot(left, right)`
|
|
56
59
|
|
|
57
60
|
### `src/release.mjs`
|
|
@@ -78,18 +81,22 @@ Local functions
|
|
|
78
81
|
- `assertNoNewerVersions(records, inspection)`
|
|
79
82
|
- `lockfileNeedsUpdate(records, repoRoot)`
|
|
80
83
|
- `runPrepareCommand(source, config)`
|
|
84
|
+
- `stagedPath(relative)`
|
|
81
85
|
- `withoutIgnored(repoRoot, files)`
|
|
82
|
-
- `prepareRelease({ cwd: repoRoot, dryRun, registry, report = false })`
|
|
86
|
+
- `prepareRelease({ cwd: repoRoot, dryRun, registry, report = false, carry = false })`
|
|
83
87
|
- `createNpmUserConfig(registry, directory, records = [])`
|
|
84
88
|
- `git(repoRoot, args)`
|
|
85
89
|
- `commitAll(repoRoot, message)`
|
|
86
90
|
- `releaseCommitMessage(entries)`
|
|
87
91
|
- `catalogPins(record, entry)`
|
|
88
|
-
- `waitUntilServedAsLatest(pins, inspection, { attempts = Number(process.env.JSKIT_RELEASE_SERVE_ATTEMPTS ||
|
|
89
|
-
- `
|
|
92
|
+
- `waitUntilServedAsLatest(pins, inspection, catalog, { attempts = Number(process.env.JSKIT_RELEASE_SERVE_ATTEMPTS || 120), delayMs = Number(process.env.JSKIT_RELEASE_RETRY_DELAY_MS || 5_000) } = {})`
|
|
93
|
+
- `moveLatestToCatalog(entry, record, inspection, npmArgs)`
|
|
94
|
+
- `committedTarballs(repoRoot, records, { entries, staged })`
|
|
95
|
+
- `uploadInDependencyOrder(entries, recordsByName, upload)`
|
|
96
|
+
- `publishRelease(records, { cwd: repoRoot, registry }, carried = null)`
|
|
90
97
|
- `publishCommand(options)`
|
|
91
98
|
- `forgetPinnedLockEntries(repoRoot, names)`
|
|
92
|
-
- `installReleasedPins(repoRoot, { attempts = 20, delayMs = Number(process.env.JSKIT_RELEASE_RETRY_DELAY_MS ||
|
|
99
|
+
- `installReleasedPins(repoRoot, { attempts = 20, delayMs = Number(process.env.JSKIT_RELEASE_RETRY_DELAY_MS || 10_000) } = {})`
|
|
93
100
|
- `pinCommand({ cwd: repoRoot, from, dryRun, noCommit, noPush, branch })`
|
|
94
101
|
|
|
95
102
|
### bin
|
|
@@ -2138,6 +2138,19 @@ it. Check and judge, for each file:
|
|
|
2138
2138
|
- its statements per row are still measured, as any write path's are: a batch
|
|
2139
2139
|
of 200 rows costs about what a batch of 10 does.
|
|
2140
2140
|
|
|
2141
|
+
Tables the application's people define while it runs, which no table resource
|
|
2142
|
+
describes, can live in json-rest-api's AnyAPI storage, built in such an
|
|
2143
|
+
infrastructure module from `@jskit-ai/resource-runtime/server/anyapi`:
|
|
2144
|
+
`AnyapiRegistry`, `JsonRestApi`, `RestApiAnyapiKnexPlugin`, `RestApiPlugin`,
|
|
2145
|
+
`RowPolicyPlugin` and `ensureAnyApiSchema`, the very objects of the
|
|
2146
|
+
json-rest-api copy the runtime's handles run on. Import them from there and
|
|
2147
|
+
declare no json-rest-api in the application: json-rest-api knows the
|
|
2148
|
+
transactions `api.transaction` opened by identity, so an AnyAPI write given a
|
|
2149
|
+
handle's `txOptions.trx` joins that transaction only on the runtime's copy,
|
|
2150
|
+
and beside a second copy it fails with "transaction must be an active
|
|
2151
|
+
transaction from api.transaction". `npm run jskit:update` then moves the one
|
|
2152
|
+
copy with the catalog.
|
|
2153
|
+
|
|
2141
2154
|
`jskit check` also fails:
|
|
2142
2155
|
|
|
2143
2156
|
- a table with two table resources;
|
|
@@ -391,6 +391,15 @@ the application's `knexfile.js`:
|
|
|
391
391
|
a later run in the same tree restores them instead of replaying the
|
|
392
392
|
migrations. Only the copies the run made are dropped, and none a session is
|
|
393
393
|
connected to, such as another run's: the run names each copy it kept and why.
|
|
394
|
+
- A run that never reached its end (killed with `SIGKILL`, stopped at a
|
|
395
|
+
command's time limit, or on a machine that went down) leaves its copies. So
|
|
396
|
+
every run, a browser run's `prepare` module included, starts by dropping the
|
|
397
|
+
numbered copies of its database it will not make itself (`<name>_<count>` and
|
|
398
|
+
up), none a session is connected to, and its summary says so
|
|
399
|
+
(`dropped 1 numbered test database(s) earlier runs left (shop_test_7)`): a
|
|
400
|
+
killed run's copies last until the next run starts, never longer. Only names
|
|
401
|
+
JSKIT gives a copy count: `<name>_snapshot` and a project's own lettered
|
|
402
|
+
copies stay. Two runs at once on one database name still are not supported.
|
|
394
403
|
- The snapshot holds the schema as the engine reports it and the rows the
|
|
395
404
|
migrations wrote, including the migration ledger. On MySQL and MariaDB it is
|
|
396
405
|
each table's `SHOW CREATE TABLE` and rows, in
|
|
@@ -100,7 +100,7 @@ Avoid:
|
|
|
100
100
|
|
|
101
101
|
- filtering `document.data` in `service.js`
|
|
102
102
|
- accepting visible ids or hierarchy roots from client query parameters
|
|
103
|
-
- installing `RowPolicyPlugin` in applications
|
|
103
|
+
- installing `RowPolicyPlugin` in applications for their table resources (the runtime installs it; only an application's own AnyAPI instances, built from `@jskit-ai/resource-runtime/server/anyapi`, install it themselves)
|
|
104
104
|
- adding a default policy file to every CRUD
|
|
105
105
|
- returning a Knex builder or promise from a synchronous grouped contribution
|
|
106
106
|
- swallowing a policy error and retrying without mandatory visibility
|
|
@@ -36,7 +36,7 @@ Rules:
|
|
|
36
36
|
assert that each Up returns to its origin in order; a direct `page.goto()`
|
|
37
37
|
asserts the declared parent. Do not replace this wait with sleeps.
|
|
38
38
|
- A managed runner supplies `PLAYWRIGHT_BASE_URL`. When it is set, JSKIT does not start another app server.
|
|
39
|
-
- Otherwise the config starts the app on `PLAYWRIGHT_PORT
|
|
39
|
+
- Otherwise the config starts the app on `PLAYWRIGHT_PORT` when a runner sets it, and by default on free ports of the run's own, which it gives its workers in `PLAYWRIGHT_PORT`: two runs on one machine never wait for each other's port or reuse another run's server. Never fix a port in the config.
|
|
40
40
|
- A managed runner may supply an authenticated context through `PLAYWRIGHT_STORAGE_STATE`. Treat that file as a temporary secret: do not commit it, print it, or retain it after the run.
|
|
41
41
|
- Shared CRUD lists retain both card and table markup and hide the inactive
|
|
42
42
|
layout with CSS. Select visible record text with
|
|
@@ -60,8 +60,8 @@ Run related cases in one suite invocation. Prepare the isolated database and
|
|
|
60
60
|
fixtures once for that invocation, never once per test. An app's
|
|
61
61
|
`playwright.config.mjs` is `browserTestConfig()` from
|
|
62
62
|
`@jskit-ai/jskit-catalog/browser-tests`: the production build, made once and
|
|
63
|
-
reused while
|
|
64
|
-
worker. Its `prepare` module (the `database/mysql-application` and
|
|
63
|
+
reused while the files it read are unchanged (a server-only edit does not
|
|
64
|
+
rebuild it), and one server, port and database per worker. Its `prepare` module (the `database/mysql-application` and
|
|
65
65
|
`database/postgres-application` patterns' `example/tests/e2e/databases.js`)
|
|
66
66
|
restores each worker's copy of `BROWSER_TEST_DB_NAME` from the stored schema
|
|
67
67
|
snapshot and runs the fixture seed, which restores any migration-owned
|