@naylence/runtime 0.3.5-test.7 → 0.3.5-test.900
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/dist/browser/index.cjs +15 -16
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.mjs +15 -16
- package/dist/browser/index.mjs.map +1 -1
- package/dist/cjs/naylence/fame/storage/node-index.js +5 -0
- package/dist/cjs/naylence/fame/storage/node-index.js.map +1 -1
- package/dist/cjs/naylence/fame/storage/storage-profile-factory.js +21 -3
- package/dist/cjs/naylence/fame/storage/storage-profile-factory.js.map +1 -1
- package/dist/esm/naylence/fame/storage/node-index.js +5 -0
- package/dist/esm/naylence/fame/storage/node-index.js.map +1 -1
- package/dist/esm/naylence/fame/storage/storage-profile-factory.js +19 -2
- package/dist/esm/naylence/fame/storage/storage-profile-factory.js.map +1 -1
- package/dist/node/index.cjs +15 -16
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +15 -16
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.cjs +15 -16
- package/dist/node/node.cjs.map +1 -1
- package/dist/node/node.mjs +15 -16
- package/dist/node/node.mjs.map +1 -1
- package/dist/types/naylence/fame/storage/node-index.d.ts.map +1 -1
- package/dist/types/naylence/fame/storage/storage-profile-factory.d.ts +17 -0
- package/dist/types/naylence/fame/storage/storage-profile-factory.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.cjs
CHANGED
|
@@ -3333,38 +3333,37 @@ const ENV_VAR_STORAGE_DB_DIRECTORY = 'FAME_STORAGE_DB_DIRECTORY';
|
|
|
3333
3333
|
const ENV_VAR_STORAGE_MASTER_KEY = 'FAME_STORAGE_MASTER_KEY';
|
|
3334
3334
|
const ENV_VAR_STORAGE_ENCRYPTED = 'FAME_STORAGE_ENCRYPTED';
|
|
3335
3335
|
const PROFILE_NAME_MEMORY = 'memory';
|
|
3336
|
-
const
|
|
3337
|
-
const PROFILE_NAME_ENCRYPTED_SQLITE = 'encrypted-sqlite';
|
|
3336
|
+
const PROFILE_NAME_INDEXEDDB = 'indexeddb';
|
|
3338
3337
|
const storageProfileSchema = zod.z
|
|
3339
3338
|
.object({
|
|
3340
3339
|
type: zod.z.literal('StorageProfile').default('StorageProfile'),
|
|
3341
3340
|
profile: zod.z
|
|
3342
3341
|
.string()
|
|
3343
3342
|
.optional()
|
|
3344
|
-
.describe('Storage profile name (memory | sqlite | encrypted-sqlite)'),
|
|
3343
|
+
.describe('Storage profile name (memory | indexeddb | sqlite | encrypted-sqlite)'),
|
|
3345
3344
|
})
|
|
3346
3345
|
.passthrough();
|
|
3347
3346
|
const MEMORY_PROFILE_CONFIG = {
|
|
3348
3347
|
type: 'InMemoryStorageProvider',
|
|
3349
3348
|
};
|
|
3350
|
-
const
|
|
3351
|
-
type: '
|
|
3349
|
+
const INDEXEDDB_PROFILE_CONFIG = {
|
|
3350
|
+
type: 'IndexedDBStorageProvider',
|
|
3351
|
+
};
|
|
3352
|
+
({
|
|
3352
3353
|
dbDirectory: factory.Expressions.env(ENV_VAR_STORAGE_DB_DIRECTORY, './data/sqlite'),
|
|
3353
3354
|
isEncrypted: factory.Expressions.env(ENV_VAR_STORAGE_ENCRYPTED, 'false'),
|
|
3354
|
-
masterKey: factory.Expressions.env(ENV_VAR_STORAGE_MASTER_KEY, '')
|
|
3355
|
-
|
|
3356
|
-
};
|
|
3357
|
-
const ENCRYPTED_SQLITE_PROFILE_CONFIG = {
|
|
3358
|
-
type: 'SQLiteStorageProvider',
|
|
3355
|
+
masterKey: factory.Expressions.env(ENV_VAR_STORAGE_MASTER_KEY, '')});
|
|
3356
|
+
({
|
|
3359
3357
|
dbDirectory: factory.Expressions.env(ENV_VAR_STORAGE_DB_DIRECTORY, './data/sqlite'),
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3358
|
+
masterKey: factory.Expressions.env(ENV_VAR_STORAGE_MASTER_KEY)});
|
|
3359
|
+
// Base profile map with browser-safe options
|
|
3360
|
+
const BASE_PROFILE_MAP = {
|
|
3361
|
+
[PROFILE_NAME_MEMORY]: MEMORY_PROFILE_CONFIG,
|
|
3362
|
+
[PROFILE_NAME_INDEXEDDB]: INDEXEDDB_PROFILE_CONFIG,
|
|
3363
3363
|
};
|
|
3364
|
+
// Extended profile map - can be augmented by Node.js environment
|
|
3364
3365
|
const PROFILE_MAP$1 = {
|
|
3365
|
-
|
|
3366
|
-
[PROFILE_NAME_SQLITE]: SQLITE_PROFILE_CONFIG,
|
|
3367
|
-
[PROFILE_NAME_ENCRYPTED_SQLITE]: ENCRYPTED_SQLITE_PROFILE_CONFIG,
|
|
3366
|
+
...BASE_PROFILE_MAP,
|
|
3368
3367
|
};
|
|
3369
3368
|
class StorageProfileFactory extends StorageProviderFactory {
|
|
3370
3369
|
constructor() {
|