@learncard/learn-cloud-service 2.5.34 → 2.5.35
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/.env.example +13 -0
- package/CHANGELOG.md +19 -0
- package/dist/accesslayer/share-content/delete.d.ts +5 -0
- package/dist/accesslayer/share-content/delete.d.ts.map +1 -0
- package/dist/accesslayer/share-content/index.d.ts +8 -0
- package/dist/accesslayer/share-content/index.d.ts.map +1 -0
- package/dist/accesslayer/share-content/initialize.d.ts +5 -0
- package/dist/accesslayer/share-content/initialize.d.ts.map +1 -0
- package/dist/accesslayer/share-content/internal.d.ts +12 -0
- package/dist/accesslayer/share-content/internal.d.ts.map +1 -0
- package/dist/accesslayer/share-content/put.d.ts +5 -0
- package/dist/accesslayer/share-content/put.d.ts.map +1 -0
- package/dist/accesslayer/share-content/read.d.ts +7 -0
- package/dist/accesslayer/share-content/read.d.ts.map +1 -0
- package/dist/accesslayer/share-content/types.d.ts +85 -0
- package/dist/accesslayer/share-content/types.d.ts.map +1 -0
- package/dist/config/environment.d.ts +12 -0
- package/dist/config/environment.d.ts.map +1 -1
- package/dist/helpers/share-content-auth/adapters.d.ts +12 -0
- package/dist/helpers/share-content-auth/adapters.d.ts.map +1 -0
- package/dist/helpers/share-content-auth/canonical.d.ts +15 -0
- package/dist/helpers/share-content-auth/canonical.d.ts.map +1 -0
- package/dist/helpers/share-content-auth/claims.d.ts +19 -0
- package/dist/helpers/share-content-auth/claims.d.ts.map +1 -0
- package/dist/helpers/share-content-auth/config.d.ts +12 -0
- package/dist/helpers/share-content-auth/config.d.ts.map +1 -0
- package/dist/helpers/share-content-auth/index.d.ts +8 -0
- package/dist/helpers/share-content-auth/index.d.ts.map +1 -0
- package/dist/helpers/share-content-auth/token.d.ts +28 -0
- package/dist/helpers/share-content-auth/token.d.ts.map +1 -0
- package/dist/helpers/share-content-auth/types.d.ts +70 -0
- package/dist/helpers/share-content-auth/types.d.ts.map +1 -0
- package/dist/helpers/share-content-auth/verifier.d.ts +9 -0
- package/dist/helpers/share-content-auth/verifier.d.ts.map +1 -0
- package/dist/index.js +2 -2
- package/dist/models/ShareContent.d.ts +160 -0
- package/dist/models/ShareContent.d.ts.map +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/share-content/config.d.ts +28 -0
- package/dist/share-content/config.d.ts.map +1 -0
- package/dist/share-content/index.d.ts +6 -0
- package/dist/share-content/index.d.ts.map +1 -0
- package/dist/share-content/plugin.d.ts +5 -0
- package/dist/share-content/plugin.d.ts.map +1 -0
- package/dist/share-content/production.d.ts +15 -0
- package/dist/share-content/production.d.ts.map +1 -0
- package/dist/share-content/runtime.d.ts +23 -0
- package/dist/share-content/runtime.d.ts.map +1 -0
- package/dist/share-content/types.d.ts +23 -0
- package/dist/share-content/types.d.ts.map +1 -0
- package/lambda.ts +61 -0
- package/package.json +14 -14
- package/serverless.yml +25 -0
- package/src/accesslayer/share-content/delete.ts +124 -0
- package/src/accesslayer/share-content/index.ts +70 -0
- package/src/accesslayer/share-content/initialize.ts +24 -0
- package/src/accesslayer/share-content/internal.ts +89 -0
- package/src/accesslayer/share-content/put.ts +93 -0
- package/src/accesslayer/share-content/read.ts +124 -0
- package/src/accesslayer/share-content/types.ts +155 -0
- package/src/config/environment.ts +33 -0
- package/src/docker-entry.ts +19 -0
- package/src/helpers/share-content-auth/adapters.ts +48 -0
- package/src/helpers/share-content-auth/canonical.ts +91 -0
- package/src/helpers/share-content-auth/claims.ts +164 -0
- package/src/helpers/share-content-auth/config.ts +160 -0
- package/src/helpers/share-content-auth/index.ts +59 -0
- package/src/helpers/share-content-auth/token.ts +148 -0
- package/src/helpers/share-content-auth/types.ts +195 -0
- package/src/helpers/share-content-auth/verifier.ts +220 -0
- package/src/models/ShareContent.ts +198 -0
- package/src/models/index.ts +1 -0
- package/src/share-content/config.ts +199 -0
- package/src/share-content/index.ts +5 -0
- package/src/share-content/plugin.ts +317 -0
- package/src/share-content/production.ts +107 -0
- package/src/share-content/runtime.ts +90 -0
- package/src/share-content/types.ts +59 -0
- package/test/share-content-auth.spec.ts +1161 -0
- package/test/share-content-config.spec.ts +252 -0
- package/test/share-content-didkit.spec.ts +411 -0
- package/test/share-content-endpoint.spec.ts +825 -0
- package/test/share-content-redis-setup.ts +18 -0
- package/test/share-content.spec.ts +681 -0
- package/vitest.config.ts +1 -0
- package/vitest.share-content-config-unit.config.ts +8 -0
- package/vitest.share-content-endpoint.config.ts +21 -0
- package/vitest.share-content.config.ts +19 -0
package/vitest.config.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
2
|
+
import { createVitestConfig, nodePreset } from '../../../vitest.shared';
|
|
3
|
+
|
|
4
|
+
/** Configuration and boot-order checks without starting databases or services. */
|
|
5
|
+
export default createVitestConfig(
|
|
6
|
+
{ ...nodePreset, plugins: [tsconfigPaths({ root: '../../' })] },
|
|
7
|
+
{ test: { include: ['test/share-content-config.spec.ts'] } }
|
|
8
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createVitestConfig, serviceIntegrationPreset } from '../../../vitest.shared';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Isolated LC-2187 endpoint suite.
|
|
5
|
+
*
|
|
6
|
+
* These specs exercise the real Fastify inject path, the real C1 verification
|
|
7
|
+
* module, a real ephemeral MongoDB and a real Redis container (global setup).
|
|
8
|
+
* They import no service `@mongo` singleton and touch no application database.
|
|
9
|
+
*/
|
|
10
|
+
export default createVitestConfig(serviceIntegrationPreset, {
|
|
11
|
+
test: {
|
|
12
|
+
globalSetup: './test/share-content-redis-setup.ts',
|
|
13
|
+
include: [
|
|
14
|
+
'test/share-content-config.spec.ts',
|
|
15
|
+
'test/share-content-endpoint.spec.ts',
|
|
16
|
+
'test/share-content-didkit.spec.ts',
|
|
17
|
+
],
|
|
18
|
+
hookTimeout: 240_000,
|
|
19
|
+
testTimeout: 120_000,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createVitestConfig, serviceIntegrationPreset } from '../../../vitest.shared';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Isolated real-Mongo test config for the LC-2187 share-content repository and
|
|
5
|
+
* authorization module.
|
|
6
|
+
*
|
|
7
|
+
* These specs start their own `MongoMemoryServer` (or none at all) and never
|
|
8
|
+
* import the service `@mongo` singleton, so they do not need the shared
|
|
9
|
+
* integration global setup, Redis, the app router or any environment. The
|
|
10
|
+
* endpoint/transport suite lives in `vitest.share-content-endpoint.config.ts`
|
|
11
|
+
* and requires a real Redis container; it is deliberately excluded here so this
|
|
12
|
+
* repository-level config stays independent of Redis.
|
|
13
|
+
*/
|
|
14
|
+
export default createVitestConfig(serviceIntegrationPreset, {
|
|
15
|
+
test: {
|
|
16
|
+
include: ['test/share-content.spec.ts', 'test/share-content-auth.spec.ts'],
|
|
17
|
+
hookTimeout: 120_000,
|
|
18
|
+
},
|
|
19
|
+
});
|