@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/node/node.cjs
CHANGED
|
@@ -4894,38 +4894,37 @@ const ENV_VAR_STORAGE_DB_DIRECTORY = 'FAME_STORAGE_DB_DIRECTORY';
|
|
|
4894
4894
|
const ENV_VAR_STORAGE_MASTER_KEY = 'FAME_STORAGE_MASTER_KEY';
|
|
4895
4895
|
const ENV_VAR_STORAGE_ENCRYPTED = 'FAME_STORAGE_ENCRYPTED';
|
|
4896
4896
|
const PROFILE_NAME_MEMORY = 'memory';
|
|
4897
|
-
const
|
|
4898
|
-
const PROFILE_NAME_ENCRYPTED_SQLITE = 'encrypted-sqlite';
|
|
4897
|
+
const PROFILE_NAME_INDEXEDDB = 'indexeddb';
|
|
4899
4898
|
const storageProfileSchema = zod.z
|
|
4900
4899
|
.object({
|
|
4901
4900
|
type: zod.z.literal('StorageProfile').default('StorageProfile'),
|
|
4902
4901
|
profile: zod.z
|
|
4903
4902
|
.string()
|
|
4904
4903
|
.optional()
|
|
4905
|
-
.describe('Storage profile name (memory | sqlite | encrypted-sqlite)'),
|
|
4904
|
+
.describe('Storage profile name (memory | indexeddb | sqlite | encrypted-sqlite)'),
|
|
4906
4905
|
})
|
|
4907
4906
|
.passthrough();
|
|
4908
4907
|
const MEMORY_PROFILE_CONFIG = {
|
|
4909
4908
|
type: 'InMemoryStorageProvider',
|
|
4910
4909
|
};
|
|
4911
|
-
const
|
|
4912
|
-
type: '
|
|
4910
|
+
const INDEXEDDB_PROFILE_CONFIG = {
|
|
4911
|
+
type: 'IndexedDBStorageProvider',
|
|
4912
|
+
};
|
|
4913
|
+
({
|
|
4913
4914
|
dbDirectory: factory.Expressions.env(ENV_VAR_STORAGE_DB_DIRECTORY, './data/sqlite'),
|
|
4914
4915
|
isEncrypted: factory.Expressions.env(ENV_VAR_STORAGE_ENCRYPTED, 'false'),
|
|
4915
|
-
masterKey: factory.Expressions.env(ENV_VAR_STORAGE_MASTER_KEY, '')
|
|
4916
|
-
|
|
4917
|
-
};
|
|
4918
|
-
const ENCRYPTED_SQLITE_PROFILE_CONFIG = {
|
|
4919
|
-
type: 'SQLiteStorageProvider',
|
|
4916
|
+
masterKey: factory.Expressions.env(ENV_VAR_STORAGE_MASTER_KEY, '')});
|
|
4917
|
+
({
|
|
4920
4918
|
dbDirectory: factory.Expressions.env(ENV_VAR_STORAGE_DB_DIRECTORY, './data/sqlite'),
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4919
|
+
masterKey: factory.Expressions.env(ENV_VAR_STORAGE_MASTER_KEY)});
|
|
4920
|
+
// Base profile map with browser-safe options
|
|
4921
|
+
const BASE_PROFILE_MAP = {
|
|
4922
|
+
[PROFILE_NAME_MEMORY]: MEMORY_PROFILE_CONFIG,
|
|
4923
|
+
[PROFILE_NAME_INDEXEDDB]: INDEXEDDB_PROFILE_CONFIG,
|
|
4924
4924
|
};
|
|
4925
|
+
// Extended profile map - can be augmented by Node.js environment
|
|
4925
4926
|
const PROFILE_MAP$1 = {
|
|
4926
|
-
|
|
4927
|
-
[PROFILE_NAME_SQLITE]: SQLITE_PROFILE_CONFIG,
|
|
4928
|
-
[PROFILE_NAME_ENCRYPTED_SQLITE]: ENCRYPTED_SQLITE_PROFILE_CONFIG,
|
|
4927
|
+
...BASE_PROFILE_MAP,
|
|
4929
4928
|
};
|
|
4930
4929
|
class StorageProfileFactory extends StorageProviderFactory {
|
|
4931
4930
|
constructor() {
|