json-rest-api 1.0.21 → 1.0.22
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/audit/00-charter.md +103 -0
- package/audit/01-scope-map.md +84 -0
- package/audit/02-coverage-matrix.csv +174 -0
- package/audit/03-invariants.md +123 -0
- package/audit/04-standards-rubric.md +56 -0
- package/audit/05-competitor-rubric.md +77 -0
- package/audit/06-findings.md +160 -0
- package/audit/07-risk-register.csv +10 -0
- package/audit/08-remediation-roadmap.md +177 -0
- package/audit/09-signoff-check.md +23 -0
- package/audit/10-final-synthesis.md +29 -0
- package/audit/evidence/code/all-files-json-rest-api.txt +168 -0
- package/audit/evidence/code/all-files-json-rest-schema.txt +12 -0
- package/audit/evidence/code/boundary-leak-checks.txt +72 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__bulk-operations-plugin.js.txt +480 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__connectors__express-plugin.js.txt +532 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__connectors__lib__busboy-detector.js.txt +175 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__connectors__lib__formidable-detector.js.txt +138 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__connectors__lib__request-helpers.js.txt +222 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__file-handling-plugin.js.txt +342 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__dbTablesOperations.js.txt +304 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__fractional-positioning.js.txt +188 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__compile-schemas.js.txt +336 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__connectors-query-parser.js.txt +165 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__database-capabilities.js.txt +265 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__database-value-normalizers.js.txt +369 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__default-data-helpers.js.txt +72 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__field-utils.js.txt +139 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__knex-constants.js.txt +45 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__knex-field-helpers.js.txt +396 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__knex-json-api-transformers.js.txt +162 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__payload-validators.js.txt +1314 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__schema-helpers.js.txt +488 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__scope-validations.js.txt +484 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__simplified-helpers.js.txt +857 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-cross-table-search.js.txt +565 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-json-api-transformers-querying.js.txt +485 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-pagination-helpers.js.txt +560 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-process-includes.js.txt +167 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-query-helpers-base.js.txt +109 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-query-helpers.js.txt +1064 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-relationship-includes.js.txt +1983 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-window-queries.js.txt +328 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__url-helpers.js.txt +119 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__storage__storage-adapter.js.txt +160 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__writing__many-to-many-manipulations.js.txt +300 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__writing__relationship-processor.js.txt +245 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-access.js.txt +459 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-cors-plugin.js.txt +237 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-knex-plugin.js.txt +1135 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-multihome-plugin.js.txt +314 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-hooks__compile-resource-schemas.js.txt +7 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-hooks__register-relationship-routes.js.txt +71 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-hooks__register-scope-routes.js.txt +102 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-hooks__turn-scope-init-into-vars.js.txt +49 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-hooks__validate-include-configurations.js.txt +39 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__add-route.js.txt +23 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__check-permissions.js.txt +13 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__common.js.txt +639 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__delete-relationship.js.txt +117 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__delete.js.txt +104 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__enrich-attributes.js.txt +199 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__get-related.js.txt +353 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__get-relationship.js.txt +61 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__get.js.txt +184 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__patch-relationship.js.txt +55 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__patch.js.txt +191 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__post-relationship.js.txt +110 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__post.js.txt +168 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__put.js.txt +253 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__query.js.txt +207 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__release.js.txt +12 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin.js.txt +165 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-positioning-plugin.js.txt +668 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__socketio-plugin.js.txt +621 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__storage__local-storage.js.txt +218 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__storage__s3-storage.js.txt +124 -0
- package/audit/evidence/code/critical-pass1/json-rest-schema__src__CorePlugin.js.txt +269 -0
- package/audit/evidence/code/critical-pass1/json-rest-schema__src__Schema.js.txt +242 -0
- package/audit/evidence/code/critical-pass1/json-rest-schema__src__index.js.txt +77 -0
- package/audit/evidence/code/critical-pass1-risk-keywords.txt +238 -0
- package/audit/evidence/code/critical-pass1-summary.csv +67 -0
- package/audit/evidence/code/critical-pass2-summary.csv +67 -0
- package/audit/evidence/code/early-silent-zones-no-test-token.txt +57 -0
- package/audit/evidence/code/error-model-signals.txt +98 -0
- package/audit/evidence/code/git-files-json-rest-api.txt +171 -0
- package/audit/evidence/code/git-files-json-rest-schema.txt +27 -0
- package/audit/evidence/code/hook-flow-signals.txt +282 -0
- package/audit/evidence/code/idproperty-signals.txt +157 -0
- package/audit/evidence/code/import-cycles-non-anyapi.txt +3 -0
- package/audit/evidence/code/import-hotspots-non-anyapi.txt +96 -0
- package/audit/evidence/code/imports-json-rest-api.txt +354 -0
- package/audit/evidence/code/imports-json-rest-schema.txt +15 -0
- package/audit/evidence/code/in-scope-files-json-rest-api.txt +160 -0
- package/audit/evidence/code/in-scope-files-json-rest-schema.txt +13 -0
- package/audit/evidence/code/non-anyapi-core-files.txt +101 -0
- package/audit/evidence/code/permission-signals.txt +193 -0
- package/audit/evidence/code/query-include-signals.txt +687 -0
- package/audit/evidence/code/transaction-signals.txt +28 -0
- package/audit/evidence/code/validation-signals.txt +650 -0
- package/audit/evidence/code/write-path-signals.txt +61 -0
- package/audit/evidence/docs/docs-claims-signals.txt +1075 -0
- package/audit/evidence/docs/schema-docs-claims-signals.txt +179 -0
- package/audit/evidence/external/corpus-freeze.md +21 -0
- package/audit/evidence/external/npm-competitor-metadata.txt +70 -0
- package/audit/evidence/external/npm-download-signals.txt +23 -0
- package/audit/evidence/external/npm-jsonapi-server.txt +8 -0
- package/audit/evidence/external/npm-modern-jsonapi-metadata.txt +38 -0
- package/audit/evidence/external/readme-fortune-signals.txt +26 -0
- package/audit/evidence/external/readme-fortune.md +165 -0
- package/audit/evidence/external/readme-json-api-serializer-signals.txt +80 -0
- package/audit/evidence/external/readme-json-api-serializer.md +690 -0
- package/audit/evidence/external/readme-jsonapi-serde-server-signals.txt +0 -0
- package/audit/evidence/external/readme-jsonapi-serde-server.md +22 -0
- package/audit/evidence/external/readme-jsonapi-serializer-signals.txt +63 -0
- package/audit/evidence/external/readme-jsonapi-serializer.md +315 -0
- package/audit/evidence/external/readme-jsonapi-server-signals.txt +19 -0
- package/audit/evidence/external/readme-jsonapi-server.md +104 -0
- package/audit/evidence/external/readme-nestjs-json-api-signals.txt +4 -0
- package/audit/evidence/external/readme-nestjs-json-api.md +94 -0
- package/audit/evidence/external/readme-yaser-json-api-nestjs-signals.txt +47 -0
- package/audit/evidence/external/readme-yaser-json-api-nestjs.md +447 -0
- package/audit/evidence/external/standard-jsonapi-snippets.txt +84 -0
- package/audit/evidence/external/standard-rfc-snippets.txt +168 -0
- package/audit/evidence/external/standards-sources.txt +6 -0
- package/audit/evidence/runtime/baseline-commits.txt +2 -0
- package/audit/evidence/runtime/db-adapter-assumptions.txt +3 -0
- package/audit/evidence/runtime/environment.txt +4 -0
- package/audit/evidence/runtime/invariant-runtime-mapping.md +38 -0
- package/audit/evidence/runtime/probe-patch-relationship-error.exitcode +1 -0
- package/audit/evidence/runtime/probe-patch-relationship-error.log +76 -0
- package/audit/evidence/runtime/probe-patch-relationship-error.mjs +67 -0
- package/audit/evidence/runtime/probe-patch-relationship-referenceerror.exitcode +1 -0
- package/audit/evidence/runtime/probe-patch-relationship-referenceerror.log +62 -0
- package/audit/evidence/runtime/probe-patch-relationship-referenceerror.mjs +47 -0
- package/audit/evidence/runtime/test-exitcodes.txt +4 -0
- package/audit/evidence/runtime/test-summary.md +107 -0
- package/audit/evidence/runtime/trace-anchors.txt +61 -0
- package/audit/evidence/tests/access-multitenancy-test-signals.txt +125 -0
- package/audit/evidence/tests/failing-tests-summary.txt +25 -0
- package/audit/evidence/tests/npm-test-json-rest-api.exitcode +1 -0
- package/audit/evidence/tests/npm-test-json-rest-api.log +5885 -0
- package/audit/evidence/tests/npm-test-json-rest-schema.exitcode +1 -0
- package/audit/evidence/tests/npm-test-json-rest-schema.log +356 -0
- package/audit/evidence/tests/query-include-test-signals.txt +948 -0
- package/audit/evidence/tests/relationship-test-signals.txt +223 -0
- package/audit/evidence/tests/skipped-tests.txt +10 -0
- package/audit/evidence/tests/test-suite-list-non-anyapi.txt +30 -0
- package/audit/evidence/tests/test-suite-list.txt +32 -0
- package/audit/subsystems/docs-drift.md +49 -0
- package/audit/subsystems/pass2-cross-review.md +131 -0
- package/audit/subsystems/plugins-access.md +51 -0
- package/audit/subsystems/plugins-bulk.md +50 -0
- package/audit/subsystems/plugins-cors.md +48 -0
- package/audit/subsystems/plugins-file.md +53 -0
- package/audit/subsystems/plugins-multihome.md +50 -0
- package/audit/subsystems/plugins-positioning.md +54 -0
- package/audit/subsystems/plugins-socketio.md +50 -0
- package/audit/subsystems/query-engine.md +61 -0
- package/audit/subsystems/relationships.md +55 -0
- package/audit/subsystems/rest-orchestration.md +66 -0
- package/audit/subsystems/schema-core.md +64 -0
- package/audit/subsystems/storage-knex.md +57 -0
- package/audit/subsystems/tests.md +48 -0
- package/audit/subsystems/transport-express.md +55 -0
- package/audit/traces/trace-read-get.md +22 -0
- package/audit/traces/trace-read-query.md +25 -0
- package/audit/traces/trace-relationship-endpoints.md +31 -0
- package/audit/traces/trace-write-delete.md +17 -0
- package/audit/traces/trace-write-patch.md +26 -0
- package/audit/traces/trace-write-post.md +22 -0
- package/audit/traces/trace-write-put.md +23 -0
- package/package.json +3 -3
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Trace runtime anchors from test logs
|
|
2
|
+
|
|
3
|
+
## CRUD and query anchors
|
|
4
|
+
375: # Subtest: should delete multiple records atomically
|
|
5
|
+
376: ok 1 - should delete multiple records atomically
|
|
6
|
+
5456: # Subtest: POST - Create Resources
|
|
7
|
+
5473: ok 1 - POST - Create Resources
|
|
8
|
+
5478: # Subtest: GET - Retrieve Resources
|
|
9
|
+
5489: # Subtest: should retrieve collection of resources
|
|
10
|
+
5490: ok 3 - should retrieve collection of resources
|
|
11
|
+
5495: ok 2 - GET - Retrieve Resources
|
|
12
|
+
5500: # Subtest: PATCH - Update Resources
|
|
13
|
+
5501: # Subtest: should partially update a resource
|
|
14
|
+
5502: ok 1 - should partially update a resource
|
|
15
|
+
5507: ok 3 - PATCH - Update Resources
|
|
16
|
+
5512: # Subtest: DELETE - Remove Resources
|
|
17
|
+
5513: # Subtest: should delete an existing resource
|
|
18
|
+
5514: ok 1 - should delete an existing resource
|
|
19
|
+
5519: ok 4 - DELETE - Remove Resources
|
|
20
|
+
|
|
21
|
+
## Relationship endpoint anchors
|
|
22
|
+
5042:# Subtest: Relationship Endpoints Plugin
|
|
23
|
+
5049: # Subtest: should add authors to book via POST relationship endpoint
|
|
24
|
+
5050: ok 2 - should add authors to book via POST relationship endpoint
|
|
25
|
+
5059: # Subtest: should remove specific authors via DELETE relationship endpoint
|
|
26
|
+
5060: ok 4 - should remove specific authors via DELETE relationship endpoint
|
|
27
|
+
5103:ok 26 - Relationship Endpoints Plugin
|
|
28
|
+
|
|
29
|
+
## Include/query anchors
|
|
30
|
+
585: # Subtest: should include empty arrays for empty relationships
|
|
31
|
+
586: ok 2 - should include empty arrays for empty relationships
|
|
32
|
+
1811: # Subtest: Nested Includes with custom idProperty
|
|
33
|
+
1823: ok 5 - Nested Includes with custom idProperty
|
|
34
|
+
2483: # Subtest: Single-Level Includes
|
|
35
|
+
2484: # Subtest: should include single belongsTo relationship
|
|
36
|
+
2485: ok 1 - should include single belongsTo relationship
|
|
37
|
+
2489: # Subtest: should include multiple relationships
|
|
38
|
+
2490: ok 2 - should include multiple relationships
|
|
39
|
+
2494: # Subtest: should include relationships in collection queries
|
|
40
|
+
2495: ok 3 - should include relationships in collection queries
|
|
41
|
+
2500: ok 1 - Single-Level Includes
|
|
42
|
+
2505: # Subtest: Nested Includes
|
|
43
|
+
2506: # Subtest: should include nested relationships
|
|
44
|
+
2507: ok 1 - should include nested relationships
|
|
45
|
+
2517: ok 2 - Nested Includes
|
|
46
|
+
2523: # Subtest: should include relationships with sparse fieldsets
|
|
47
|
+
2524: ok 1 - should include relationships with sparse fieldsets
|
|
48
|
+
2910: # Subtest: Deep Nested Includes
|
|
49
|
+
2922: ok 2 - Deep Nested Includes
|
|
50
|
+
2927: # Subtest: Nested Includes with Sparse Fieldsets
|
|
51
|
+
2934: ok 3 - Nested Includes with Sparse Fieldsets
|
|
52
|
+
3144: # Subtest: should include pagination metadata in response
|
|
53
|
+
3145: ok 1 - should include pagination metadata in response
|
|
54
|
+
3154: # Subtest: should include pagination links
|
|
55
|
+
3155: ok 3 - should include pagination links
|
|
56
|
+
3186: # Subtest: should include cursor pagination links
|
|
57
|
+
3187: ok 2 - should include cursor pagination links
|
|
58
|
+
3203: # Subtest: should include count by default
|
|
59
|
+
3204: ok 1 - should include count by default
|
|
60
|
+
5489: # Subtest: should retrieve collection of resources
|
|
61
|
+
5490: ok 3 - should retrieve collection of resources
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
tests/custom-idproperty-relationships.test.js:850: assert(error.message.includes('not found') || error.message.includes('404'))
|
|
2
|
+
tests/curl.test.js:265: // Test 404 error
|
|
3
|
+
tests/curl.test.js:266: const result404 = await executeCurl(['-s', '-w', '\\n%{http_code}', '-H', 'Accept: application/vnd.api+json', `http://localhost:${TEST_PORT}/api/countries/999999`])
|
|
4
|
+
tests/curl.test.js:268: assert.equal(result404.exitCode, 0, 'CURL should exit successfully')
|
|
5
|
+
tests/curl.test.js:270: const lines = result404.stdout.trim().split('\n')
|
|
6
|
+
tests/curl.test.js:274: assert.equal(httpCode, '404', 'Should return 404 status')
|
|
7
|
+
tests/curl.test.js:278: assert.equal(response.errors[0].status, '404')
|
|
8
|
+
tests/ownership-optout.test.js:32:describe('Ownership opt-out (ownerField:false / ownership:false)', () => {
|
|
9
|
+
tests/ownership-optout.test.js:57: // Query without auth (ownership disabled -> no filtering)
|
|
10
|
+
tests/ownership-optout.test.js:63: it('ownership:false - allows create+query without user_id column present', async () => {
|
|
11
|
+
tests/ownership-optout.test.js:64: await createPublicItem('public_items_ownership', 'Gamma', 1)
|
|
12
|
+
tests/ownership-optout.test.js:65: await createPublicItem('public_items_ownership', 'Delta', 2)
|
|
13
|
+
tests/ownership-optout.test.js:67: const resultAuth = await api.resources.public_items_ownership.query({ simplified: false }, { auth: { userId: 99 } })
|
|
14
|
+
tests/ownership-optout.test.js:71: const resultNoAuth = await api.resources.public_items_ownership.query({ simplified: false })
|
|
15
|
+
tests/cors.test.js:525: assert.equal(response.status, 403)
|
|
16
|
+
tests/cors.test.js:552: assert.equal(response.status, 404)
|
|
17
|
+
tests/multihome.test.js:43: 'multihome_projects',
|
|
18
|
+
tests/multihome.test.js:44: 'multihome_tasks',
|
|
19
|
+
tests/multihome.test.js:45: 'multihome_users',
|
|
20
|
+
tests/multihome.test.js:46: 'multihome_system_settings'
|
|
21
|
+
tests/multihome.test.js:51: it('should automatically set tenant_id on new records', async () => {
|
|
22
|
+
tests/multihome.test.js:52: // Create a project for tenant A
|
|
23
|
+
tests/multihome.test.js:55: description: 'A project for tenant A'
|
|
24
|
+
tests/multihome.test.js:58: // Create with tenant context
|
|
25
|
+
tests/multihome.test.js:63: auth: { multihome_id: 'tenant-a' }
|
|
26
|
+
tests/multihome.test.js:71: description: 'A project for tenant A',
|
|
27
|
+
tests/multihome.test.js:72: tenant_id: 'tenant-a' // Should be automatically set
|
|
28
|
+
tests/multihome.test.js:76: it('should filter queries by tenant_id', async () => {
|
|
29
|
+
tests/multihome.test.js:77: // Create projects for different tenants
|
|
30
|
+
tests/multihome.test.js:84: auth: { multihome_id: 'tenant-a' }
|
|
31
|
+
tests/multihome.test.js:93: auth: { multihome_id: 'tenant-a' }
|
|
32
|
+
tests/multihome.test.js:102: auth: { multihome_id: 'tenant-b' }
|
|
33
|
+
tests/multihome.test.js:105: // Query as tenant A - should only see tenant A's projects
|
|
34
|
+
tests/multihome.test.js:109: auth: { multihome_id: 'tenant-a' }
|
|
35
|
+
tests/multihome.test.js:116: // Query as tenant B - should only see tenant B's projects
|
|
36
|
+
tests/multihome.test.js:120: auth: { multihome_id: 'tenant-b' }
|
|
37
|
+
tests/multihome.test.js:128: it('should prevent access to other tenant records', async () => {
|
|
38
|
+
tests/multihome.test.js:129: // Create a project for tenant A
|
|
39
|
+
tests/multihome.test.js:136: auth: { multihome_id: 'tenant-a' }
|
|
40
|
+
tests/multihome.test.js:139: // Try to access as tenant B - should fail
|
|
41
|
+
tests/multihome.test.js:146: auth: { multihome_id: 'tenant-b' }
|
|
42
|
+
tests/multihome.test.js:152: 'Should not be able to access other tenant data'
|
|
43
|
+
tests/multihome.test.js:156: it('should prevent updating tenant_id to different value', async () => {
|
|
44
|
+
tests/multihome.test.js:157: // Create a project for tenant A
|
|
45
|
+
tests/multihome.test.js:164: auth: { multihome_id: 'tenant-a' }
|
|
46
|
+
tests/multihome.test.js:167: // Try to update with different tenant_id - should fail
|
|
47
|
+
tests/multihome.test.js:178: tenant_id: 'tenant-b' // Trying to change tenant
|
|
48
|
+
tests/multihome.test.js:184: auth: { multihome_id: 'tenant-a' }
|
|
49
|
+
tests/multihome.test.js:192: 'Should not be able to change tenant_id'
|
|
50
|
+
tests/multihome.test.js:198: it('should maintain tenant isolation for related records', async () => {
|
|
51
|
+
tests/multihome.test.js:199: // Create projects for different tenants
|
|
52
|
+
tests/multihome.test.js:206: auth: { multihome_id: 'tenant-a' }
|
|
53
|
+
tests/multihome.test.js:215: auth: { multihome_id: 'tenant-b' }
|
|
54
|
+
tests/multihome.test.js:218: // Create task for tenant A project
|
|
55
|
+
tests/multihome.test.js:230: auth: { multihome_id: 'tenant-a' }
|
|
56
|
+
tests/multihome.test.js:233: // Try to create task for tenant B project as tenant A - should fail
|
|
57
|
+
tests/multihome.test.js:247: auth: { multihome_id: 'tenant-a' }
|
|
58
|
+
tests/multihome.test.js:251: // Should fail because project belongs to different tenant
|
|
59
|
+
tests/multihome.test.js:254: 'Should not be able to link to other tenant resources'
|
|
60
|
+
tests/multihome.test.js:257: // Query with includes - should only see own tenant data
|
|
61
|
+
tests/multihome.test.js:265: auth: { multihome_id: 'tenant-a' }
|
|
62
|
+
tests/multihome.test.js:271: assert.equal(projectWithTasks.included[0].attributes.tenant_id, 'tenant-a')
|
|
63
|
+
tests/multihome.test.js:276: it('should allow access to excluded resources without tenant context', async () => {
|
|
64
|
+
tests/multihome.test.js:277: // Create system setting without tenant context
|
|
65
|
+
tests/multihome.test.js:288: assert(!setting.data.attributes.tenant_id, 'Should not have tenant_id')
|
|
66
|
+
tests/multihome.test.js:290: // Query without tenant context should work
|
|
67
|
+
tests/multihome.test.js:297: // Should be accessible by any tenant
|
|
68
|
+
tests/multihome.test.js:302: auth: { multihome_id: 'tenant-a' }
|
|
69
|
+
tests/multihome.test.js:310: it('should require tenant context when requireAuth is true', async () => {
|
|
70
|
+
tests/multihome.test.js:311: // Try to create without tenant context - should fail
|
|
71
|
+
tests/multihome.test.js:322: return err.message.includes('multihome context')
|
|
72
|
+
tests/multihome.test.js:324: 'Should require tenant context when requireAuth is true'
|
|
73
|
+
tests/multihome.test.js:328: it('should validate resources have tenant field when allowMissing is false', async () => {
|
|
74
|
+
tests/multihome.test.js:330: // if a resource was missing the tenant field. Since our test resources
|
|
75
|
+
tests/multihome.test.js:331: // all have tenant_id (except excluded ones), we can verify the
|
|
76
|
+
tests/multihome.test.js:333: assert.equal(api.vars.multihome.field, 'tenant_id')
|
|
77
|
+
tests/multihome.test.js:334: assert.equal(api.vars.multihome.allowMissing, false)
|
|
78
|
+
tests/multihome.test.js:335: assert(api.vars.multihome.excludeResources.includes('system_settings'))
|
|
79
|
+
tests/multihome.test.js:340: it('should apply tenant filter to filtered queries', async () => {
|
|
80
|
+
tests/multihome.test.js:341: // Create users for different tenants
|
|
81
|
+
tests/multihome.test.js:344: email: 'admin@tenant-a.com',
|
|
82
|
+
tests/multihome.test.js:350: auth: { multihome_id: 'tenant-a' }
|
|
83
|
+
tests/multihome.test.js:355: email: 'user@tenant-a.com',
|
|
84
|
+
tests/multihome.test.js:361: auth: { multihome_id: 'tenant-a' }
|
|
85
|
+
tests/multihome.test.js:366: email: 'admin@tenant-b.com',
|
|
86
|
+
tests/multihome.test.js:372: auth: { multihome_id: 'tenant-b' }
|
|
87
|
+
tests/multihome.test.js:375: // Query for admins as tenant A - should only see tenant A admin
|
|
88
|
+
tests/multihome.test.js:382: auth: { multihome_id: 'tenant-a' }
|
|
89
|
+
tests/multihome.test.js:385: assert.equal(adminsA.data.length, 1, 'Should only see tenant A admin')
|
|
90
|
+
tests/multihome.test.js:386: assert.equal(adminsA.data[0].attributes.email, 'admin@tenant-a.com')
|
|
91
|
+
tests/multihome.test.js:388: // Query for all users as tenant B - should only see tenant B users
|
|
92
|
+
tests/multihome.test.js:392: auth: { multihome_id: 'tenant-b' }
|
|
93
|
+
tests/multihome.test.js:395: assert.equal(usersB.data.length, 1, 'Should only see tenant B users')
|
|
94
|
+
tests/multihome.test.js:396: assert.equal(usersB.data[0].attributes.email, 'admin@tenant-b.com')
|
|
95
|
+
tests/multihome.test.js:399: it('should apply tenant filter with sorting and pagination', async () => {
|
|
96
|
+
tests/multihome.test.js:400: // Create multiple projects for tenant A
|
|
97
|
+
tests/multihome.test.js:409: auth: { multihome_id: 'tenant-a' }
|
|
98
|
+
tests/multihome.test.js:413: // Create projects for tenant B
|
|
99
|
+
tests/multihome.test.js:421: auth: { multihome_id: 'tenant-b' }
|
|
100
|
+
tests/multihome.test.js:425: // Query with pagination as tenant A
|
|
101
|
+
tests/multihome.test.js:433: auth: { multihome_id: 'tenant-a' }
|
|
102
|
+
tests/multihome.test.js:448: auth: { multihome_id: 'tenant-a' }
|
|
103
|
+
tests/multihome.test.js:452: assert(page2.data.every(p => p.attributes.tenant_id === 'tenant-a'))
|
|
104
|
+
tests/multihome.test.js:457: it('should provide clear error when no tenant context available', async () => {
|
|
105
|
+
tests/multihome.test.js:465: return err.message.includes('No multihome context available')
|
|
106
|
+
tests/multihome.test.js:471: it('should handle missing tenant field gracefully for excluded resources', async () => {
|
|
107
|
+
tests/multihome.test.js:472: // system_settings is excluded and doesn't have tenant_id field
|
|
108
|
+
tests/multihome.test.js:480: auth: { multihome_id: 'tenant-a' } // Should be ignored for excluded resources
|
|
109
|
+
tests/multihome.test.js:484: assert(!result.data.attributes.tenant_id, 'Excluded resource should not have tenant_id')
|
|
110
|
+
tests/multihome.test.js:489: it('should prevent bypassing tenant filter with malicious IDs', async () => {
|
|
111
|
+
tests/multihome.test.js:490: // Create a project for tenant A
|
|
112
|
+
tests/multihome.test.js:497: auth: { multihome_id: 'tenant-a' }
|
|
113
|
+
tests/multihome.test.js:500: // Try various bypass attempts as tenant B
|
|
114
|
+
tests/multihome.test.js:514: auth: { multihome_id: 'tenant-b' }
|
|
115
|
+
tests/multihome.test.js:528: // Create data for tenant A
|
|
116
|
+
tests/multihome.test.js:535: auth: { multihome_id: 'tenant-a' }
|
|
117
|
+
tests/multihome.test.js:538: // Attempt access as tenant B
|
|
118
|
+
tests/multihome.test.js:544: auth: { multihome_id: 'tenant-b' }
|
|
119
|
+
tests/rest-api-access.test.js:86: assert.equal(error.statusCode, 403)
|
|
120
|
+
tests/rest-api-access.test.js:92: it('auto assigns ownership when creating a project', async () => {
|
|
121
|
+
tests/rest-api-access.test.js:127: it('filters query results by ownership for non-admin users', async () => {
|
|
122
|
+
tests/rest-api-access.test.js:147: it('allows admin roles to bypass ownership filtering', async () => {
|
|
123
|
+
tests/rest-api-access.test.js:177: assert.equal(error.statusCode, 403)
|
|
124
|
+
tests/rest-api-access.test.js:183: it('enforces helper ownership checks', () => {
|
|
125
|
+
tests/rest-api-access.test.js:193: assert.equal(error.statusCode, 403)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Failing test summary
|
|
2
|
+
captured_at=2026-03-01T16:03:35Z
|
|
3
|
+
|
|
4
|
+
## json-rest-api
|
|
5
|
+
4235: not ok 1 - should handle empty string vs null in filters
|
|
6
|
+
4238: location: '/home/merc/Development/current/json-rest-api/tests/positioning-multifilter.test.js:597:5'
|
|
7
|
+
4246: name: 'AssertionError'
|
|
8
|
+
4251: TestContext.<anonymous> (file:///home/merc/Development/current/json-rest-api/tests/positioning-multifilter.test.js:629:14)
|
|
9
|
+
4258: not ok 2 - should handle numeric vs string filter values
|
|
10
|
+
4261: location: '/home/merc/Development/current/json-rest-api/tests/positioning-multifilter.test.js:649:5'
|
|
11
|
+
4269: name: 'AssertionError'
|
|
12
|
+
4274: TestContext.<anonymous> (file:///home/merc/Development/current/json-rest-api/tests/positioning-multifilter.test.js:681:14)
|
|
13
|
+
4279: not ok 3 - Edge Cases with Multi-Filter
|
|
14
|
+
4283: location: '/home/merc/Development/current/json-rest-api/tests/positioning-multifilter.test.js:596:3'
|
|
15
|
+
4289:not ok 22 - Multi-Filter Positioning Tests
|
|
16
|
+
4293: location: '/home/merc/Development/current/json-rest-api/tests/positioning-multifilter.test.js:17:1'
|
|
17
|
+
5881:# fail 2
|
|
18
|
+
5883:# skipped 10
|
|
19
|
+
|
|
20
|
+
## json-rest-schema
|
|
21
|
+
7:# import { createSchema, createKnexTable, generateKnexMigration } from './src/index.js'
|
|
22
|
+
9:# SyntaxError: The requested module './src/index.js' does not provide an export named 'createKnexTable'
|
|
23
|
+
16:not ok 1 - /home/merc/Development/current/json-rest-schema/test-knex-table-real.js
|
|
24
|
+
24: code: 'ERR_TEST_FAILURE'
|
|
25
|
+
352:# fail 1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1
|